| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // Note that the WebUI infrastructure runs on the UI thread, therefore all of | 47 // Note that the WebUI infrastructure runs on the UI thread, therefore all of |
| 48 // this class's methods are expected to run on the UI thread. | 48 // this class's methods are expected to run on the UI thread. |
| 49 class InstantUIMessageHandler | 49 class InstantUIMessageHandler |
| 50 : public content::WebUIMessageHandler, | 50 : public content::WebUIMessageHandler, |
| 51 public base::SupportsWeakPtr<InstantUIMessageHandler> { | 51 public base::SupportsWeakPtr<InstantUIMessageHandler> { |
| 52 public: | 52 public: |
| 53 InstantUIMessageHandler(); | 53 InstantUIMessageHandler(); |
| 54 virtual ~InstantUIMessageHandler(); | 54 virtual ~InstantUIMessageHandler(); |
| 55 | 55 |
| 56 // WebUIMessageHandler implementation. | 56 // WebUIMessageHandler implementation. |
| 57 virtual void RegisterMessages() OVERRIDE; | 57 virtual void RegisterMessages() override; |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 void GetPreferenceValue(const base::ListValue* args); | 60 void GetPreferenceValue(const base::ListValue* args); |
| 61 void SetPreferenceValue(const base::ListValue* args); | 61 void SetPreferenceValue(const base::ListValue* args); |
| 62 void GetDebugInfo(const base::ListValue* value); | 62 void GetDebugInfo(const base::ListValue* value); |
| 63 void ClearDebugInfo(const base::ListValue* value); | 63 void ClearDebugInfo(const base::ListValue* value); |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(InstantUIMessageHandler); | 65 DISALLOW_COPY_AND_ASSIGN(InstantUIMessageHandler); |
| 66 }; | 66 }; |
| 67 | 67 |
| (...skipping 102 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 |