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

Side by Side Diff: mojo/shell/package_manager/package_manager_impl.cc

Issue 1684783002: Rename ServiceProvider to InterfaceProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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/package_manager/content_handler_unittest.cc ('k') | mojo/shell/public/cpp/connect.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/package_manager/package_manager_impl.h" 5 #include "mojo/shell/package_manager/package_manager_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if (url.SchemeIs(url::kDataScheme)) { 143 if (url.SchemeIs(url::kDataScheme)) {
144 DataFetcher::Start(url, loader_callback); 144 DataFetcher::Start(url, loader_callback);
145 return; 145 return;
146 } 146 }
147 147
148 GURL resolved_url = ResolveURL(url); 148 GURL resolved_url = ResolveURL(url);
149 if (resolved_url.SchemeIsFile()) { 149 if (resolved_url.SchemeIsFile()) {
150 // LocalFetcher uses the network service to infer MIME types from URLs. 150 // LocalFetcher uses the network service to infer MIME types from URLs.
151 // Skip this for mojo URLs to avoid recursively loading the network service. 151 // Skip this for mojo URLs to avoid recursively loading the network service.
152 if (!network_service_ && !url.SchemeIs("mojo") && !url.SchemeIs("exe")) { 152 if (!network_service_ && !url.SchemeIs("mojo") && !url.SchemeIs("exe")) {
153 ConnectToService(application_manager_, GURL("mojo:network_service"), 153 ConnectToInterface(application_manager_, GURL("mojo:network_service"),
154 &network_service_); 154 &network_service_);
155 } 155 }
156 // Ownership of this object is transferred to |loader_callback|. 156 // Ownership of this object is transferred to |loader_callback|.
157 // TODO(beng): this is eff'n weird. 157 // TODO(beng): this is eff'n weird.
158 new LocalFetcher(network_service_.get(), resolved_url, 158 new LocalFetcher(network_service_.get(), resolved_url,
159 GetBaseURLAndQuery(resolved_url, nullptr), 159 GetBaseURLAndQuery(resolved_url, nullptr),
160 shell_file_root_, loader_callback); 160 shell_file_root_, loader_callback);
161 161
162 // TODO(beng): Determine if this is in the right place, and block 162 // TODO(beng): Determine if this is in the right place, and block
163 // establishing the connection on receiving a complete manifest. 163 // establishing the connection on receiving a complete manifest.
164 EnsureURLInCatalog(url); 164 EnsureURLInCatalog(url);
165 return; 165 return;
166 } 166 }
167 167
168 if (!url_loader_factory_) { 168 if (!url_loader_factory_) {
169 ConnectToService(application_manager_, GURL("mojo:network_service"), 169 ConnectToInterface(application_manager_, GURL("mojo:network_service"),
170 &url_loader_factory_); 170 &url_loader_factory_);
171 } 171 }
172 172
173 // Ownership of this object is transferred to |loader_callback|. 173 // Ownership of this object is transferred to |loader_callback|.
174 // TODO(beng): this is eff'n weird. 174 // TODO(beng): this is eff'n weird.
175 new NetworkFetcher(disable_cache_, std::move(request), 175 new NetworkFetcher(disable_cache_, std::move(request),
176 url_loader_factory_.get(), loader_callback); 176 url_loader_factory_.get(), loader_callback);
177 } 177 }
178 178
179 uint32_t PackageManagerImpl::HandleWithContentHandler( 179 uint32_t PackageManagerImpl::HandleWithContentHandler(
180 Fetcher* fetcher, 180 Fetcher* fetcher,
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 return; 381 return;
382 382
383 base::DictionaryValue* dictionary = nullptr; 383 base::DictionaryValue* dictionary = nullptr;
384 CHECK(manifest->GetAsDictionary(&dictionary)); 384 CHECK(manifest->GetAsDictionary(&dictionary));
385 DeserializeApplication(dictionary); 385 DeserializeApplication(dictionary);
386 SerializeCatalog(); 386 SerializeCatalog();
387 } 387 }
388 388
389 } // namespace shell 389 } // namespace shell
390 } // namespace mojo 390 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/package_manager/content_handler_unittest.cc ('k') | mojo/shell/public/cpp/connect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698