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/flags_ui.h" | 5 #include "chrome/browser/ui/webui/flags_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 virtual ~FlagsDOMHandler() {} | 110 virtual ~FlagsDOMHandler() {} |
111 | 111 |
112 // Initializes the DOM handler with the provided flags storage and flags | 112 // Initializes the DOM handler with the provided flags storage and flags |
113 // access. If there were flags experiments requested from javascript before | 113 // access. If there were flags experiments requested from javascript before |
114 // this was called, it calls |HandleRequestFlagsExperiments| again. | 114 // this was called, it calls |HandleRequestFlagsExperiments| again. |
115 void Init(about_flags::FlagsStorage* flags_storage, | 115 void Init(about_flags::FlagsStorage* flags_storage, |
116 about_flags::FlagAccess access); | 116 about_flags::FlagAccess access); |
117 | 117 |
118 // WebUIMessageHandler implementation. | 118 // WebUIMessageHandler implementation. |
119 virtual void RegisterMessages() OVERRIDE; | 119 virtual void RegisterMessages() override; |
120 | 120 |
121 // Callback for the "requestFlagsExperiments" message. | 121 // Callback for the "requestFlagsExperiments" message. |
122 void HandleRequestFlagsExperiments(const base::ListValue* args); | 122 void HandleRequestFlagsExperiments(const base::ListValue* args); |
123 | 123 |
124 // Callback for the "enableFlagsExperiment" message. | 124 // Callback for the "enableFlagsExperiment" message. |
125 void HandleEnableFlagsExperimentMessage(const base::ListValue* args); | 125 void HandleEnableFlagsExperimentMessage(const base::ListValue* args); |
126 | 126 |
127 // Callback for the "restartBrowser" message. Restores all tabs on restart. | 127 // Callback for the "restartBrowser" message. Restores all tabs on restart. |
128 void HandleRestartBrowser(const base::ListValue* args); | 128 void HandleRestartBrowser(const base::ListValue* args); |
129 | 129 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 } | 328 } |
329 | 329 |
330 #if defined(OS_CHROMEOS) | 330 #if defined(OS_CHROMEOS) |
331 // static | 331 // static |
332 void FlagsUI::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 332 void FlagsUI::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
333 registry->RegisterListPref(prefs::kEnabledLabsExperiments, | 333 registry->RegisterListPref(prefs::kEnabledLabsExperiments, |
334 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 334 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
335 } | 335 } |
336 | 336 |
337 #endif | 337 #endif |
OLD | NEW |