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

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

Issue 629523003: Rename Get to GetProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix device Created 6 years, 2 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
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_application_loader.h" 5 #include "mojo/shell/dynamic_application_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/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 weak_ptr_factory_(this) { 128 weak_ptr_factory_(this) {
129 URLRequestPtr request(URLRequest::New()); 129 URLRequestPtr request(URLRequest::New());
130 request->url = String::From(url); 130 request->url = String::From(url);
131 request->auto_follow_redirects = true; 131 request->auto_follow_redirects = true;
132 132
133 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 133 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
134 switches::kDisableCache)) { 134 switches::kDisableCache)) {
135 request->bypass_cache = true; 135 request->bypass_cache = true;
136 } 136 }
137 137
138 network_service->CreateURLLoader(Get(&url_loader_)); 138 network_service->CreateURLLoader(GetProxy(&url_loader_));
139 url_loader_->Start(request.Pass(), 139 url_loader_->Start(request.Pass(),
140 base::Bind(&NetworkLoader::OnLoadComplete, 140 base::Bind(&NetworkLoader::OnLoadComplete,
141 weak_ptr_factory_.GetWeakPtr())); 141 weak_ptr_factory_.GetWeakPtr()));
142 } 142 }
143 143
144 virtual ~NetworkLoader() { 144 virtual ~NetworkLoader() {
145 if (!file_.empty()) 145 if (!file_.empty())
146 base::DeleteFile(file_, false); 146 base::DeleteFile(file_, false);
147 } 147 }
148 148
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // TODO(darin): What should we do about service errors? This implies that 239 // TODO(darin): What should we do about service errors? This implies that
240 // the app closed its handle to the service manager. Maybe we don't care? 240 // the app closed its handle to the service manager. Maybe we don't care?
241 } 241 }
242 242
243 void DynamicApplicationLoader::LoaderComplete(Loader* loader) { 243 void DynamicApplicationLoader::LoaderComplete(Loader* loader) {
244 loaders_.erase(std::find(loaders_.begin(), loaders_.end(), loader)); 244 loaders_.erase(std::find(loaders_.begin(), loaders_.end(), loader));
245 } 245 }
246 246
247 } // namespace shell 247 } // namespace shell
248 } // namespace mojo 248 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/view_manager_init_service_context.cc ('k') | mojo/shell/external_application_listener_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698