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

Side by Side Diff: components/html_viewer/html_document.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 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 "components/html_viewer/html_document.h" 5 #include "components/html_viewer/html_document.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (devtools_agent_request_.is_pending()) { 179 if (devtools_agent_request_.is_pending()) {
180 if (frame_->devtools_agent()) { 180 if (frame_->devtools_agent()) {
181 frame_->devtools_agent()->BindToRequest( 181 frame_->devtools_agent()->BindToRequest(
182 std::move(devtools_agent_request_)); 182 std::move(devtools_agent_request_));
183 } else { 183 } else {
184 devtools_agent_request_ = 184 devtools_agent_request_ =
185 mojo::InterfaceRequest<devtools_service::DevToolsAgent>(); 185 mojo::InterfaceRequest<devtools_service::DevToolsAgent>();
186 } 186 }
187 } 187 }
188 188
189 const GURL url(extra_data->synthetic_response->url); 189 const GURL url(extra_data->synthetic_response->url.get());
190 190
191 blink::WebURLRequest web_request; 191 blink::WebURLRequest web_request;
192 web_request.initialize(); 192 web_request.initialize();
193 web_request.setURL(url); 193 web_request.setURL(url);
194 web_request.setExtraData(extra_data.release()); 194 web_request.setExtraData(extra_data.release());
195 195
196 frame_->LoadRequest(web_request, navigation_start_time); 196 frame_->LoadRequest(web_request, navigation_start_time);
197 } 197 }
198 198
199 HTMLDocument::BeforeLoadCache* HTMLDocument::GetBeforeLoadCache() { 199 HTMLDocument::BeforeLoadCache* HTMLDocument::GetBeforeLoadCache() {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 DCHECK(!transferable_state_.window_tree_delegate_impl); 325 DCHECK(!transferable_state_.window_tree_delegate_impl);
326 transferable_state_.window_tree_delegate_impl.reset( 326 transferable_state_.window_tree_delegate_impl.reset(
327 new WindowTreeDelegateImpl(this)); 327 new WindowTreeDelegateImpl(this));
328 transferable_state_.owns_window_tree_connection = true; 328 transferable_state_.owns_window_tree_connection = true;
329 mus::WindowTreeConnection::Create( 329 mus::WindowTreeConnection::Create(
330 transferable_state_.window_tree_delegate_impl.get(), std::move(request), 330 transferable_state_.window_tree_delegate_impl.get(), std::move(request),
331 mus::WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); 331 mus::WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED);
332 } 332 }
333 333
334 } // namespace html_viewer 334 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/blink_platform_impl.cc ('k') | components/html_viewer/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698