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

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

Issue 506103002: Rename ApplicationLoader::OnServiceError to OnApplicationError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge nits Created 6 years, 3 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
« no previous file with comments | « mojo/shell/network_application_loader.h ('k') | mojo/shell/ui_application_loader_android.h » ('j') | 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/network_application_loader.h" 5 #include "mojo/shell/network_application_loader.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "mojo/public/cpp/application/application_connection.h" 10 #include "mojo/public/cpp/application/application_connection.h"
(...skipping 26 matching lines...) Expand all
37 return; 37 return;
38 38
39 uintptr_t key = reinterpret_cast<uintptr_t>(manager); 39 uintptr_t key = reinterpret_cast<uintptr_t>(manager);
40 if (apps_.find(key) == apps_.end()) { 40 if (apps_.find(key) == apps_.end()) {
41 scoped_ptr<ApplicationImpl> app( 41 scoped_ptr<ApplicationImpl> app(
42 new ApplicationImpl(this, shell_handle.Pass())); 42 new ApplicationImpl(this, shell_handle.Pass()));
43 apps_.add(key, app.Pass()); 43 apps_.add(key, app.Pass());
44 } 44 }
45 } 45 }
46 46
47 void NetworkApplicationLoader::OnServiceError(ApplicationManager* manager, 47 void NetworkApplicationLoader::OnApplicationError(ApplicationManager* manager,
48 const GURL& url) { 48 const GURL& url) {
49 apps_.erase(reinterpret_cast<uintptr_t>(manager)); 49 apps_.erase(reinterpret_cast<uintptr_t>(manager));
50 } 50 }
51 51
52 void NetworkApplicationLoader::Initialize(ApplicationImpl* app) { 52 void NetworkApplicationLoader::Initialize(ApplicationImpl* app) {
53 // The context must be created on the same thread as the network service. 53 // The context must be created on the same thread as the network service.
54 context_.reset(new NetworkContext(GetBasePath())); 54 context_.reset(new NetworkContext(GetBasePath()));
55 } 55 }
56 56
57 bool NetworkApplicationLoader::ConfigureIncomingConnection( 57 bool NetworkApplicationLoader::ConfigureIncomingConnection(
58 ApplicationConnection* connection) { 58 ApplicationConnection* connection) {
59 connection->AddService(this); 59 connection->AddService(this);
60 return true; 60 return true;
61 } 61 }
62 62
63 void NetworkApplicationLoader::Create( 63 void NetworkApplicationLoader::Create(
64 ApplicationConnection* connection, 64 ApplicationConnection* connection,
65 InterfaceRequest<NetworkService> request) { 65 InterfaceRequest<NetworkService> request) {
66 BindToRequest(new NetworkServiceImpl(connection, context_.get()), &request); 66 BindToRequest(new NetworkServiceImpl(connection, context_.get()), &request);
67 } 67 }
68 68
69 } // namespace shell 69 } // namespace shell
70 } // namespace mojo 70 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/network_application_loader.h ('k') | mojo/shell/ui_application_loader_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698