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

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

Issue 1679573002: Move shell interfaces into the shell.mojom namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
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
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
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,
181 const Identity& source, 181 const Identity& source,
182 const GURL& target_url, 182 const GURL& target_url,
183 const CapabilityFilter& target_filter, 183 const CapabilityFilter& target_filter,
184 InterfaceRequest<Application>* application_request) { 184 InterfaceRequest<mojom::Application>* application_request) {
185 Identity content_handler_identity; 185 Identity content_handler_identity;
186 URLResponsePtr response; 186 URLResponsePtr response;
187 if (ShouldHandleWithContentHandler(fetcher, 187 if (ShouldHandleWithContentHandler(fetcher,
188 target_url, 188 target_url,
189 target_filter, 189 target_filter,
190 &content_handler_identity, 190 &content_handler_identity,
191 &response)) { 191 &response)) {
192 ContentHandlerConnection* connection = 192 ContentHandlerConnection* connection =
193 GetContentHandler(content_handler_identity, source); 193 GetContentHandler(content_handler_identity, source);
194 connection->StartApplication(std::move(*application_request), 194 connection->StartApplication(std::move(*application_request),
195 std::move(response)); 195 std::move(response));
196 return connection->id(); 196 return connection->id();
197 } 197 }
198 return Shell::kInvalidApplicationID; 198 return mojom::Shell::kInvalidApplicationID;
199 } 199 }
200 200
201 bool PackageManagerImpl::IsURLInCatalog(const std::string& url) const { 201 bool PackageManagerImpl::IsURLInCatalog(const std::string& url) const {
202 return catalog_.find(url) != catalog_.end(); 202 return catalog_.find(url) != catalog_.end();
203 } 203 }
204 204
205 std::string PackageManagerImpl::GetApplicationName( 205 std::string PackageManagerImpl::GetApplicationName(
206 const std::string& url) const { 206 const std::string& url) const {
207 auto it = catalog_.find(url); 207 auto it = catalog_.find(url);
208 return it != catalog_.end() ? it->second.name : url; 208 return it != catalog_.end() ? it->second.name : url;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 return; 382 return;
383 383
384 base::DictionaryValue* dictionary = nullptr; 384 base::DictionaryValue* dictionary = nullptr;
385 CHECK(manifest->GetAsDictionary(&dictionary)); 385 CHECK(manifest->GetAsDictionary(&dictionary));
386 DeserializeApplication(dictionary); 386 DeserializeApplication(dictionary);
387 SerializeCatalog(); 387 SerializeCatalog();
388 } 388 }
389 389
390 } // namespace shell 390 } // namespace shell
391 } // namespace mojo 391 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/package_manager/package_manager_impl.h ('k') | mojo/shell/public/cpp/application_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698