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

Unified Diff: chrome/browser/ui/webui/omnibox/omnibox_ui_handler.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
diff --git a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
index d6192ef3469034b946b172d848337a3454f31e72..42078f3ca258a2561ec390bc95e5663d0c1307e3 100644
--- a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
+++ b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
@@ -151,14 +151,14 @@ void OmniboxUIHandler::OnResultChanged(bool default_match_changed) {
if (bookmark_model) {
for (size_t i = 0; i < result->combined_results.size(); ++i) {
result->combined_results[i]->starred = bookmark_model->IsBookmarked(
- GURL(result->combined_results[i]->destination_url));
+ GURL(result->combined_results[i]->destination_url.get()));
}
for (size_t i = 0; i < result->results_by_provider.size(); ++i) {
const AutocompleteResultsForProviderMojo& result_by_provider =
*result->results_by_provider[i];
for (size_t j = 0; j < result_by_provider.results.size(); ++j) {
result_by_provider.results[j]->starred = bookmark_model->IsBookmarked(
- GURL(result_by_provider.results[j]->destination_url));
+ GURL(result_by_provider.results[j]->destination_url.get()));
}
}
}
« no previous file with comments | « chrome/browser/ui/webui/engagement/site_engagement_ui.cc ('k') | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698