Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Unified Diff: shell/application_manager/network_fetcher.cc

Issue 951643002: Register application connections under their post-redirect URL. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cleanup Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: shell/application_manager/network_fetcher.cc
diff --git a/shell/application_manager/network_fetcher.cc b/shell/application_manager/network_fetcher.cc
index 6eabd9913a5f0cd999c025c1ddc70416d0ec59cf..01bdc3edc24271cabaaf092b7d3934f75533ac38 100644
--- a/shell/application_manager/network_fetcher.cc
+++ b/shell/application_manager/network_fetcher.cc
@@ -37,6 +37,20 @@ NetworkFetcher::NetworkFetcher(bool disable_cache,
NetworkFetcher::~NetworkFetcher() {
}
+const GURL& NetworkFetcher::GetURL() const {
+ return url_;
+}
+
+GURL NetworkFetcher::GetRedirectURL() const {
+ if (!response_)
+ return GURL::EmptyGURL();
+
+ if (response_->redirect_url.is_null())
+ return GURL::EmptyGURL();
+
+ return GURL(response_->redirect_url);
+}
+
URLResponsePtr NetworkFetcher::AsURLResponse(base::TaskRunner* task_runner,
uint32_t skip) {
if (skip != 0) {
@@ -167,7 +181,7 @@ void NetworkFetcher::StartNetworkRequest(const GURL& url,
NetworkService* network_service) {
URLRequestPtr request(URLRequest::New());
request->url = String::From(url);
- request->auto_follow_redirects = true;
+ request->auto_follow_redirects = false;
request->bypass_cache = disable_cache_;
network_service->CreateURLLoader(GetProxy(&url_loader_));

Powered by Google App Engine
This is Rietveld 408576698