OLD | NEW |
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 "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/prefs/pref_service.h" | |
9 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/search_engines/template_url_fetcher_factory.h" | 9 #include "chrome/browser/search_engines/template_url_fetcher_factory.h" |
11 #include "chrome/browser/search_engines/template_url_service_factory.h" | 10 #include "chrome/browser/search_engines/template_url_service_factory.h" |
12 #include "chrome/browser/ui/search_engines/edit_search_engine_controller.h" | 11 #include "chrome/browser/ui/search_engines/edit_search_engine_controller.h" |
13 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" | 12 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" |
14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
15 #include "chrome/common/render_messages.h" | 14 #include "chrome/common/render_messages.h" |
16 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
| 16 #include "components/prefs/pref_service.h" |
17 #include "components/search_engines/template_url.h" | 17 #include "components/search_engines/template_url.h" |
18 #include "components/search_engines/template_url_fetcher.h" | 18 #include "components/search_engines/template_url_fetcher.h" |
19 #include "components/search_engines/template_url_service.h" | 19 #include "components/search_engines/template_url_service.h" |
20 #include "content/public/browser/favicon_status.h" | 20 #include "content/public/browser/favicon_status.h" |
21 #include "content/public/browser/navigation_controller.h" | 21 #include "content/public/browser/navigation_controller.h" |
22 #include "content/public/browser/navigation_entry.h" | 22 #include "content/public/browser/navigation_entry.h" |
23 #include "content/public/browser/render_frame_host.h" | 23 #include "content/public/browser/render_frame_host.h" |
24 #include "content/public/browser/render_process_host.h" | 24 #include "content/public/browser/render_process_host.h" |
25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
26 #include "content/public/common/frame_navigate_params.h" | 26 #include "content/public/common/frame_navigate_params.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 // the favicon url wasn't obtained before the load started. This assumes the | 247 // the favicon url wasn't obtained before the load started. This assumes the |
248 // latter. | 248 // latter. |
249 // TODO(sky): Need a way to set the favicon that doesn't involve generating | 249 // TODO(sky): Need a way to set the favicon that doesn't involve generating |
250 // its url. | 250 // its url. |
251 data.favicon_url = current_favicon.is_valid() ? | 251 data.favicon_url = current_favicon.is_valid() ? |
252 current_favicon : TemplateURL::GenerateFaviconURL(params.referrer.url); | 252 current_favicon : TemplateURL::GenerateFaviconURL(params.referrer.url); |
253 data.safe_for_autoreplace = true; | 253 data.safe_for_autoreplace = true; |
254 data.input_encodings.push_back(params.searchable_form_encoding); | 254 data.input_encodings.push_back(params.searchable_form_encoding); |
255 url_service->Add(new TemplateURL(data)); | 255 url_service->Add(new TemplateURL(data)); |
256 } | 256 } |
OLD | NEW |