| 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/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 InstantUI::InstantUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 162 InstantUI::InstantUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 163 web_ui->AddMessageHandler(new InstantUIMessageHandler()); | 163 web_ui->AddMessageHandler(new InstantUIMessageHandler()); |
| 164 | 164 |
| 165 // Set up the chrome://instant/ source. | 165 // Set up the chrome://instant/ source. |
| 166 Profile* profile = Profile::FromWebUI(web_ui); | 166 Profile* profile = Profile::FromWebUI(web_ui); |
| 167 content::WebUIDataSource::Add(profile, CreateInstantHTMLSource()); | 167 content::WebUIDataSource::Add(profile, CreateInstantHTMLSource()); |
| 168 } | 168 } |
| 169 | 169 |
| 170 // static | 170 // static |
| 171 void InstantUI::RegisterUserPrefs(PrefRegistrySyncable* registry) { | 171 void InstantUI::RegisterUserPrefs(PrefRegistrySyncable* registry) { |
| 172 registry->RegisterStringPref(prefs::kInstantUIZeroSuggestUrlPrefix, "", | 172 registry->RegisterStringPref(prefs::kInstantUIZeroSuggestUrlPrefix, |
| 173 std::string(), |
| 173 PrefRegistrySyncable::UNSYNCABLE_PREF); | 174 PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 174 } | 175 } |
| OLD | NEW |