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/options/core_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/core_options_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 NotifyPrefChanged(pref_name, std::string()); | 243 NotifyPrefChanged(pref_name, std::string()); |
244 return; | 244 return; |
245 } | 245 } |
246 } | 246 } |
247 | 247 |
248 switch (value->GetType()) { | 248 switch (value->GetType()) { |
249 case base::Value::TYPE_BOOLEAN: | 249 case base::Value::TYPE_BOOLEAN: |
250 case base::Value::TYPE_INTEGER: | 250 case base::Value::TYPE_INTEGER: |
251 case base::Value::TYPE_DOUBLE: | 251 case base::Value::TYPE_DOUBLE: |
252 case base::Value::TYPE_STRING: | 252 case base::Value::TYPE_STRING: |
| 253 case base::Value::TYPE_LIST: |
253 pref_service->Set(pref_name.c_str(), *value); | 254 pref_service->Set(pref_name.c_str(), *value); |
254 break; | 255 break; |
255 | 256 |
256 default: | 257 default: |
257 NOTREACHED(); | 258 NOTREACHED(); |
258 return; | 259 return; |
259 } | 260 } |
260 | 261 |
261 ProcessUserMetric(value, metric); | 262 ProcessUserMetric(value, metric); |
262 } | 263 } |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 } | 547 } |
547 | 548 |
548 void CoreOptionsHandler::UpdatePepperFlashSettingsEnabled() { | 549 void CoreOptionsHandler::UpdatePepperFlashSettingsEnabled() { |
549 base::FundamentalValue enabled( | 550 base::FundamentalValue enabled( |
550 plugin_status_pref_setter_.IsPepperFlashSettingsEnabled()); | 551 plugin_status_pref_setter_.IsPepperFlashSettingsEnabled()); |
551 web_ui()->CallJavascriptFunction( | 552 web_ui()->CallJavascriptFunction( |
552 "OptionsPage.setPepperFlashSettingsEnabled", enabled); | 553 "OptionsPage.setPepperFlashSettingsEnabled", enabled); |
553 } | 554 } |
554 | 555 |
555 } // namespace options | 556 } // namespace options |
OLD | NEW |