| 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 "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" | 10 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 InstantUI::InstantUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 96 InstantUI::InstantUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 97 web_ui->AddMessageHandler(new InstantUIMessageHandler()); | 97 web_ui->AddMessageHandler(new InstantUIMessageHandler()); |
| 98 | 98 |
| 99 // Set up the chrome://instant/ source. | 99 // Set up the chrome://instant/ source. |
| 100 Profile* profile = Profile::FromWebUI(web_ui); | 100 Profile* profile = Profile::FromWebUI(web_ui); |
| 101 ChromeURLDataManager::AddDataSource(profile, CreateInstantHTMLSource()); | 101 ChromeURLDataManager::AddDataSource(profile, CreateInstantHTMLSource()); |
| 102 } | 102 } |
| 103 | 103 |
| 104 // static | 104 // static |
| 105 void InstantUI::RegisterUserPrefs(PrefService* user_prefs) { | 105 void InstantUI::RegisterUserPrefs(PrefServiceSyncable* user_prefs) { |
| 106 user_prefs->RegisterStringPref(prefs::kInstantUIZeroSuggestUrlPrefix, "", | 106 user_prefs->RegisterStringPref(prefs::kInstantUIZeroSuggestUrlPrefix, "", |
| 107 PrefService::UNSYNCABLE_PREF); | 107 PrefServiceSyncable::UNSYNCABLE_PREF); |
| 108 } | 108 } |
| OLD | NEW |