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

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

Issue 1568073002: Reduce string copies in GURL creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 std::make_pair(content_handler_package, qualifier); 65 std::make_pair(content_handler_package, qualifier);
66 } 66 }
67 67
68 void PackageManagerImpl::SetApplicationManager(ApplicationManager* manager) { 68 void PackageManagerImpl::SetApplicationManager(ApplicationManager* manager) {
69 application_manager_ = manager; 69 application_manager_ = manager;
70 } 70 }
71 71
72 void PackageManagerImpl::FetchRequest( 72 void PackageManagerImpl::FetchRequest(
73 URLRequestPtr request, 73 URLRequestPtr request,
74 const Fetcher::FetchCallback& loader_callback) { 74 const Fetcher::FetchCallback& loader_callback) {
75 GURL url(request->url); 75 GURL url(request->url.get());
76 if (url.SchemeIs(AboutFetcher::kAboutScheme)) { 76 if (url.SchemeIs(AboutFetcher::kAboutScheme)) {
77 AboutFetcher::Start(url, loader_callback); 77 AboutFetcher::Start(url, loader_callback);
78 return; 78 return;
79 } 79 }
80 80
81 if (url.SchemeIs(url::kDataScheme)) { 81 if (url.SchemeIs(url::kDataScheme)) {
82 DataFetcher::Start(url, loader_callback); 82 DataFetcher::Start(url, loader_callback);
83 return; 83 return;
84 } 84 }
85 85
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 void PackageManagerImpl::OnContentHandlerConnectionClosed( 218 void PackageManagerImpl::OnContentHandlerConnectionClosed(
219 ContentHandlerConnection* connection) { 219 ContentHandlerConnection* connection) {
220 // Remove the mapping. 220 // Remove the mapping.
221 auto it = identity_to_content_handler_.find(connection->identity()); 221 auto it = identity_to_content_handler_.find(connection->identity());
222 DCHECK(it != identity_to_content_handler_.end()); 222 DCHECK(it != identity_to_content_handler_.end());
223 identity_to_content_handler_.erase(it); 223 identity_to_content_handler_.erase(it);
224 } 224 }
225 225
226 } // namespace shell 226 } // namespace shell
227 } // namespace mojo 227 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/package_manager/content_handler_unittest.cc ('k') | mojo/shell/shell_application_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698