| OLD | NEW |
| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 ConnectToService(GURL("mojo:network_service"), | 203 ConnectToService(GURL("mojo:network_service"), |
| 204 &authenticating_network_service_); | 204 &authenticating_network_service_); |
| 205 } | 205 } |
| 206 | 206 |
| 207 mojo::NetworkService* network_service = authenticating_network_service_.get(); | 207 mojo::NetworkService* network_service = authenticating_network_service_.get(); |
| 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 (base::EndsWith(resolved_url.path(), "/authentication.mojo", |
| 214 EndsWith(resolved_url.path(), | 214 base::CompareCase::SENSITIVE) || |
| 215 "/authenticating_url_loader_interceptor.mojo", true)) { | 215 base::EndsWith(resolved_url.path(), |
| 216 "/authenticating_url_loader_interceptor.mojo", |
| 217 base::CompareCase::SENSITIVE)) { |
| 216 network_service = network_service_.get(); | 218 network_service = network_service_.get(); |
| 217 } else if (!initialized_authentication_interceptor_) { | 219 } else if (!initialized_authentication_interceptor_) { |
| 218 #ifndef NO_AUTHENTICATION | 220 #ifndef NO_AUTHENTICATION |
| 219 // TODO(toshik): FNL hasn't supported authentication, yet | 221 // TODO(toshik): FNL hasn't supported authentication, yet |
| 220 authentication::AuthenticationServicePtr authentication_service; | 222 authentication::AuthenticationServicePtr authentication_service; |
| 221 ConnectToService(GURL("mojo:authentication"), &authentication_service); | 223 ConnectToService(GURL("mojo:authentication"), &authentication_service); |
| 222 mojo::AuthenticatingURLLoaderInterceptorMetaFactoryPtr | 224 mojo::AuthenticatingURLLoaderInterceptorMetaFactoryPtr |
| 223 interceptor_meta_factory; | 225 interceptor_meta_factory; |
| 224 ConnectToService(GURL("mojo:authenticating_url_loader_interceptor"), | 226 ConnectToService(GURL("mojo:authenticating_url_loader_interceptor"), |
| 225 &interceptor_meta_factory); | 227 &interceptor_meta_factory); |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 return args_it->second; | 551 return args_it->second; |
| 550 return std::vector<std::string>(); | 552 return std::vector<std::string>(); |
| 551 } | 553 } |
| 552 | 554 |
| 553 void ApplicationManager::CleanupRunner(NativeRunner* runner) { | 555 void ApplicationManager::CleanupRunner(NativeRunner* runner) { |
| 554 native_runners_.erase( | 556 native_runners_.erase( |
| 555 std::find(native_runners_.begin(), native_runners_.end(), runner)); | 557 std::find(native_runners_.begin(), native_runners_.end(), runner)); |
| 556 } | 558 } |
| 557 | 559 |
| 558 } // namespace shell | 560 } // namespace shell |
| OLD | NEW |