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

Side by Side Diff: mojo/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: Mac 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/package_manager/package_manager_impl.h" 5 #include "mojo/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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 void PackageManagerImpl::SetApplicationManager( 69 void PackageManagerImpl::SetApplicationManager(
70 shell::ApplicationManager* manager) { 70 shell::ApplicationManager* manager) {
71 application_manager_ = manager; 71 application_manager_ = manager;
72 } 72 }
73 73
74 void PackageManagerImpl::FetchRequest( 74 void PackageManagerImpl::FetchRequest(
75 URLRequestPtr request, 75 URLRequestPtr request,
76 const shell::Fetcher::FetchCallback& loader_callback) { 76 const shell::Fetcher::FetchCallback& loader_callback) {
77 GURL url(request->url); 77 GURL url(request->url.get());
78 if (url.SchemeIs(fetcher::AboutFetcher::kAboutScheme)) { 78 if (url.SchemeIs(fetcher::AboutFetcher::kAboutScheme)) {
79 fetcher::AboutFetcher::Start(url, loader_callback); 79 fetcher::AboutFetcher::Start(url, loader_callback);
80 return; 80 return;
81 } 81 }
82 82
83 if (url.SchemeIs(url::kDataScheme)) { 83 if (url.SchemeIs(url::kDataScheme)) {
84 fetcher::DataFetcher::Start(url, loader_callback); 84 fetcher::DataFetcher::Start(url, loader_callback);
85 return; 85 return;
86 } 86 }
87 87
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 void PackageManagerImpl::OnContentHandlerConnectionClosed( 238 void PackageManagerImpl::OnContentHandlerConnectionClosed(
239 ContentHandlerConnection* connection) { 239 ContentHandlerConnection* connection) {
240 // Remove the mapping. 240 // Remove the mapping.
241 auto it = identity_to_content_handler_.find(connection->identity()); 241 auto it = identity_to_content_handler_.find(connection->identity());
242 DCHECK(it != identity_to_content_handler_.end()); 242 DCHECK(it != identity_to_content_handler_.end());
243 identity_to_content_handler_.erase(it); 243 identity_to_content_handler_.erase(it);
244 } 244 }
245 245
246 } // namespace package_manager 246 } // namespace package_manager
247 } // namespace mojo 247 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698