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

Side by Side Diff: mojo/shell/dynamic_service_loader.cc

Issue 324023002: Mojo: cleanup redirect handling for network service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/services/public/interfaces/network/url_loader.mojom ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/shell/dynamic_service_loader.h" 5 #include "mojo/shell/dynamic_service_loader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 url_loader_.set_client(this); 89 url_loader_.set_client(this);
90 } 90 }
91 91
92 virtual void Start(const GURL& url, 92 virtual void Start(const GURL& url,
93 ScopedMessagePipeHandle service_handle, 93 ScopedMessagePipeHandle service_handle,
94 Context* context) OVERRIDE { 94 Context* context) OVERRIDE {
95 service_handle_ = service_handle.Pass(); 95 service_handle_ = service_handle.Pass();
96 96
97 URLRequestPtr request(URLRequest::New()); 97 URLRequestPtr request(URLRequest::New());
98 request->url = url.spec(); 98 request->url = url.spec();
99 request->follow_redirects = true; 99 request->auto_follow_redirects = true;
100 100
101 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 101 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
102 switches::kDisableCache)) { 102 switches::kDisableCache)) {
103 request->bypass_cache = true; 103 request->bypass_cache = true;
104 } 104 }
105 105
106 DataPipe data_pipe; 106 DataPipe data_pipe;
107 url_loader_->Start(request.Pass(), data_pipe.producer_handle.Pass()); 107 url_loader_->Start(request.Pass(), data_pipe.producer_handle.Pass());
108 108
109 base::CreateTemporaryFile(&file_); 109 base::CreateTemporaryFile(&file_);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 173
174 void DynamicServiceLoader::OnServiceError(ServiceManager* manager, 174 void DynamicServiceLoader::OnServiceError(ServiceManager* manager,
175 const GURL& url) { 175 const GURL& url) {
176 // TODO(darin): What should we do about service errors? This implies that 176 // TODO(darin): What should we do about service errors? This implies that
177 // the app closed its handle to the service manager. Maybe we don't care? 177 // the app closed its handle to the service manager. Maybe we don't care?
178 } 178 }
179 179
180 } // namespace shell 180 } // namespace shell
181 } // namespace mojo 181 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/public/interfaces/network/url_loader.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698