Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c9045e4 authored by Martin Storsjo's avatar Martin Storsjo
Browse files

ChromiumHTTPDataSource: Keep track of the redirected URL

This makes the code actually match an existing comment in
DrmInitialization, which claimed that mURI was the redirected
URL and not the original one.

Change-Id: I0a5cc65f520f1482ff91320ae78af84a8a681ee3
parent 5bf2560c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -108,6 +108,11 @@ status_t ChromiumHTTPDataSource::connect_l(
    return mState == CONNECTED ? OK : mIOResult;
    return mState == CONNECTED ? OK : mIOResult;
}
}


void ChromiumHTTPDataSource::onRedirect(const char *url) {
    Mutex::Autolock autoLock(mLock);
    mURI = url;
}

void ChromiumHTTPDataSource::onConnectionEstablished(
void ChromiumHTTPDataSource::onConnectionEstablished(
        int64_t contentSize, const char *contentType) {
        int64_t contentSize, const char *contentType) {
    Mutex::Autolock autoLock(mLock);
    Mutex::Autolock autoLock(mLock);
+1 −0
Original line number Original line Diff line number Diff line
@@ -269,6 +269,7 @@ bool SfDelegate::getUID(uid_t *uid) const {
void SfDelegate::OnReceivedRedirect(
void SfDelegate::OnReceivedRedirect(
            net::URLRequest *request, const GURL &new_url, bool *defer_redirect) {
            net::URLRequest *request, const GURL &new_url, bool *defer_redirect) {
    MY_LOGV("OnReceivedRedirect");
    MY_LOGV("OnReceivedRedirect");
    mOwner->onRedirect(new_url.spec().c_str());
}
}


void SfDelegate::OnAuthRequired(
void SfDelegate::OnAuthRequired(
+1 −0
Original line number Original line Diff line number Diff line
@@ -113,6 +113,7 @@ private:
    void onConnectionFailed(status_t err);
    void onConnectionFailed(status_t err);
    void onReadCompleted(ssize_t size);
    void onReadCompleted(ssize_t size);
    void onDisconnectComplete();
    void onDisconnectComplete();
    void onRedirect(const char *url);


    void clearDRMState_l();
    void clearDRMState_l();