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" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 web_ui->AddMessageHandler(new InstantUIMessageHandler()); | 165 web_ui->AddMessageHandler(new InstantUIMessageHandler()); |
166 | 166 |
167 // Set up the chrome://instant/ source. | 167 // Set up the chrome://instant/ source. |
168 Profile* profile = Profile::FromWebUI(web_ui); | 168 Profile* profile = Profile::FromWebUI(web_ui); |
169 content::WebUIDataSource::Add(profile, CreateInstantHTMLSource()); | 169 content::WebUIDataSource::Add(profile, CreateInstantHTMLSource()); |
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(prefs::kInstantUIZeroSuggestUrlPrefix, |
176 prefs::kInstantUIZeroSuggestUrlPrefix, | 176 std::string()); |
177 std::string(), | |
178 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
179 } | 177 } |
OLD | NEW |