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

Side by Side Diff: shell/application_manager/application_manager.cc

Issue 1490963002: Disable authentication in application_manager for FNL (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « shell/application_manager/BUILD.gn ('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 "shell/application_manager/application_manager.h" 5 #include "shell/application_manager/application_manager.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/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 // NOTE: Attempting to initialize the apps used authentication for while 209 // NOTE: Attempting to initialize the apps used authentication for while
210 // connecting to those apps would result in a recursive loop, so it has to be 210 // connecting to those apps would result in a recursive loop, so it has to be
211 // explicitly avoided here. What this means in practice is that these apps 211 // explicitly avoided here. What this means in practice is that these apps
212 // cannot themselves require authentication to obtain. 212 // cannot themselves require authentication to obtain.
213 if (EndsWith(resolved_url.path(), "/authentication.mojo", true) || 213 if (EndsWith(resolved_url.path(), "/authentication.mojo", true) ||
214 EndsWith(resolved_url.path(), 214 EndsWith(resolved_url.path(),
215 "/authenticating_url_loader_interceptor.mojo", true)) { 215 "/authenticating_url_loader_interceptor.mojo", true)) {
216 network_service = network_service_.get(); 216 network_service = network_service_.get();
217 } else if (!initialized_authentication_interceptor_) { 217 } else if (!initialized_authentication_interceptor_) {
218 #ifndef NO_AUTHENTICATION
219 // TODO(toshik): FNL hasn't supported authentication, yet
218 authentication::AuthenticationServicePtr authentication_service; 220 authentication::AuthenticationServicePtr authentication_service;
219 ConnectToService(GURL("mojo:authentication"), &authentication_service); 221 ConnectToService(GURL("mojo:authentication"), &authentication_service);
220 mojo::AuthenticatingURLLoaderInterceptorMetaFactoryPtr 222 mojo::AuthenticatingURLLoaderInterceptorMetaFactoryPtr
221 interceptor_meta_factory; 223 interceptor_meta_factory;
222 ConnectToService(GURL("mojo:authenticating_url_loader_interceptor"), 224 ConnectToService(GURL("mojo:authenticating_url_loader_interceptor"),
223 &interceptor_meta_factory); 225 &interceptor_meta_factory);
224 mojo::URLLoaderInterceptorFactoryPtr interceptor_factory; 226 mojo::URLLoaderInterceptorFactoryPtr interceptor_factory;
225 interceptor_meta_factory->CreateURLLoaderInterceptorFactory( 227 interceptor_meta_factory->CreateURLLoaderInterceptorFactory(
226 GetProxy(&interceptor_factory), authentication_service.Pass()); 228 GetProxy(&interceptor_factory), authentication_service.Pass());
227 authenticating_network_service_->RegisterURLLoaderInterceptor( 229 authenticating_network_service_->RegisterURLLoaderInterceptor(
228 interceptor_factory.Pass()); 230 interceptor_factory.Pass());
231 #endif
229 initialized_authentication_interceptor_ = true; 232 initialized_authentication_interceptor_ = true;
230 } 233 }
231 234
232 new NetworkFetcher(options_.disable_cache, options_.force_offline_by_default, 235 new NetworkFetcher(options_.disable_cache, options_.force_offline_by_default,
233 resolved_url, url_response_disk_cache_.get(), 236 resolved_url, url_response_disk_cache_.get(),
234 network_service, callback); 237 network_service, callback);
235 } 238 }
236 239
237 bool ApplicationManager::ConnectToRunningApplication( 240 bool ApplicationManager::ConnectToRunningApplication(
238 const GURL& resolved_url, 241 const GURL& resolved_url,
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 return args_it->second; 549 return args_it->second;
547 return std::vector<std::string>(); 550 return std::vector<std::string>();
548 } 551 }
549 552
550 void ApplicationManager::CleanupRunner(NativeRunner* runner) { 553 void ApplicationManager::CleanupRunner(NativeRunner* runner) {
551 native_runners_.erase( 554 native_runners_.erase(
552 std::find(native_runners_.begin(), native_runners_.end(), runner)); 555 std::find(native_runners_.begin(), native_runners_.end(), runner));
553 } 556 }
554 557
555 } // namespace shell 558 } // namespace shell
OLDNEW
« no previous file with comments | « shell/application_manager/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698