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

Side by Side Diff: chrome/browser/ui/search_engines/search_engine_tab_helper.cc

Issue 8774050: Pass along the referrer policy (renderer side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/search_engines/search_engine_tab_helper.h" 5 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/search_engines/template_url.h" 8 #include "chrome/browser/search_engines/template_url.h"
9 #include "chrome/browser/search_engines/template_url_fetcher.h" 9 #include "chrome/browser/search_engines/template_url_fetcher.h"
10 #include "chrome/browser/search_engines/template_url_service.h" 10 #include "chrome/browser/search_engines/template_url_service.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 const GURL& favicon_url = 191 const GURL& favicon_url =
192 controller.GetLastCommittedEntry()->favicon().url(); 192 controller.GetLastCommittedEntry()->favicon().url();
193 if (favicon_url.is_valid()) { 193 if (favicon_url.is_valid()) {
194 new_url->SetFaviconURL(favicon_url); 194 new_url->SetFaviconURL(favicon_url);
195 } else { 195 } else {
196 // The favicon url isn't valid. This means there really isn't a favicon, 196 // The favicon url isn't valid. This means there really isn't a favicon,
197 // or the favicon url wasn't obtained before the load started. This assumes 197 // or the favicon url wasn't obtained before the load started. This assumes
198 // the later. 198 // the later.
199 // TODO(sky): Need a way to set the favicon that doesn't involve generating 199 // TODO(sky): Need a way to set the favicon that doesn't involve generating
200 // its url. 200 // its url.
201 new_url->SetFaviconURL(TemplateURL::GenerateFaviconURL(params.referrer)); 201 new_url->SetFaviconURL(
202 TemplateURL::GenerateFaviconURL(params.referrer.url));
202 } 203 }
203 new_url->set_safe_for_autoreplace(true); 204 new_url->set_safe_for_autoreplace(true);
204 url_service->Add(new_url); 205 url_service->Add(new_url);
205 } 206 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc ('k') | content/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698