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

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

Issue 10173001: Add a Profile* member to TemplateURL. This makes some invocations of ReplaceSearchTerms() a bit le… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_fetcher_factory.h" 10 #include "chrome/browser/search_engines/template_url_fetcher_factory.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 controller.GetLastCommittedEntry()->GetFavicon().url; 180 controller.GetLastCommittedEntry()->GetFavicon().url;
181 // If the favicon url isn't valid, it means there really isn't a favicon, or 181 // If the favicon url isn't valid, it means there really isn't a favicon, or
182 // the favicon url wasn't obtained before the load started. This assumes the 182 // the favicon url wasn't obtained before the load started. This assumes the
183 // latter. 183 // latter.
184 // TODO(sky): Need a way to set the favicon that doesn't involve generating 184 // TODO(sky): Need a way to set the favicon that doesn't involve generating
185 // its url. 185 // its url.
186 data.favicon_url = current_favicon.is_valid() ? 186 data.favicon_url = current_favicon.is_valid() ?
187 current_favicon : TemplateURL::GenerateFaviconURL(params.referrer.url); 187 current_favicon : TemplateURL::GenerateFaviconURL(params.referrer.url);
188 data.safe_for_autoreplace = true; 188 data.safe_for_autoreplace = true;
189 data.input_encodings.push_back(params.searchable_form_encoding); 189 data.input_encodings.push_back(params.searchable_form_encoding);
190 url_service->Add(new TemplateURL(data)); 190 url_service->Add(new TemplateURL(profile, data));
191 } 191 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698