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/webui/instant_ui.h" | 5 #include "chrome/browser/ui/webui/instant_ui.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/browser/ui/browser_finder.h" | 13 #include "chrome/browser/ui/browser_finder.h" |
14 #include "chrome/browser/ui/browser_instant_controller.h" | 14 #include "chrome/browser/ui/browser_instant_controller.h" |
15 #include "chrome/browser/ui/search/instant_controller.h" | 15 #include "chrome/browser/ui/search/instant_controller.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
18 #include "components/user_prefs/pref_registry_syncable.h" | 18 #include "components/pref_registry/pref_registry_syncable.h" |
19 #include "content/public/browser/web_ui.h" | 19 #include "content/public/browser/web_ui.h" |
20 #include "content/public/browser/web_ui_data_source.h" | 20 #include "content/public/browser/web_ui_data_source.h" |
21 #include "content/public/browser/web_ui_message_handler.h" | 21 #include "content/public/browser/web_ui_message_handler.h" |
22 #include "grit/browser_resources.h" | 22 #include "grit/browser_resources.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 content::WebUIDataSource* CreateInstantHTMLSource() { | 26 content::WebUIDataSource* CreateInstantHTMLSource() { |
27 content::WebUIDataSource* source = | 27 content::WebUIDataSource* source = |
28 content::WebUIDataSource::Create(chrome::kChromeUIInstantHost); | 28 content::WebUIDataSource::Create(chrome::kChromeUIInstantHost); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 } | 170 } |
171 | 171 |
172 // static | 172 // static |
173 void InstantUI::RegisterProfilePrefs( | 173 void InstantUI::RegisterProfilePrefs( |
174 user_prefs::PrefRegistrySyncable* registry) { | 174 user_prefs::PrefRegistrySyncable* registry) { |
175 registry->RegisterStringPref( | 175 registry->RegisterStringPref( |
176 prefs::kInstantUIZeroSuggestUrlPrefix, | 176 prefs::kInstantUIZeroSuggestUrlPrefix, |
177 std::string(), | 177 std::string(), |
178 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 178 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
179 } | 179 } |
OLD | NEW |