Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: chrome/browser/ui/webui/options/core_options_handler.cc

Issue 9693032: [uber page] Split up initialization of handlers from initialization of webui pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename Initialize -> InitializeHandler, SendPageValues -> InitializePage Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 19 matching lines...) Expand all
30 #include "ui/base/l10n/l10n_util.h" 30 #include "ui/base/l10n/l10n_util.h"
31 31
32 using content::UserMetricsAction; 32 using content::UserMetricsAction;
33 33
34 CoreOptionsHandler::CoreOptionsHandler() 34 CoreOptionsHandler::CoreOptionsHandler()
35 : handlers_host_(NULL) { 35 : handlers_host_(NULL) {
36 } 36 }
37 37
38 CoreOptionsHandler::~CoreOptionsHandler() {} 38 CoreOptionsHandler::~CoreOptionsHandler() {}
39 39
40 void CoreOptionsHandler::Initialize() { 40 void CoreOptionsHandler::InitializeHandler() {
41 clear_plugin_lso_data_enabled_.Init(prefs::kClearPluginLSODataEnabled, 41 clear_plugin_lso_data_enabled_.Init(prefs::kClearPluginLSODataEnabled,
42 Profile::FromWebUI(web_ui()), 42 Profile::FromWebUI(web_ui()),
43 this); 43 this);
44 UpdateClearPluginLSOData(); 44 UpdateClearPluginLSOData();
45 } 45 }
46 46
47 void CoreOptionsHandler::GetLocalizedValues( 47 void CoreOptionsHandler::GetLocalizedValues(
48 DictionaryValue* localized_strings) { 48 DictionaryValue* localized_strings) {
49 GetStaticLocalizedValues(localized_strings); 49 GetStaticLocalizedValues(localized_strings);
50 } 50 }
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 content::RecordComputedAction(metric); 448 content::RecordComputedAction(metric);
449 } 449 }
450 450
451 void CoreOptionsHandler::UpdateClearPluginLSOData() { 451 void CoreOptionsHandler::UpdateClearPluginLSOData() {
452 scoped_ptr<base::Value> enabled( 452 scoped_ptr<base::Value> enabled(
453 base::Value::CreateBooleanValue( 453 base::Value::CreateBooleanValue(
454 clear_plugin_lso_data_enabled_.GetValue())); 454 clear_plugin_lso_data_enabled_.GetValue()));
455 web_ui()->CallJavascriptFunction( 455 web_ui()->CallJavascriptFunction(
456 "OptionsPage.setClearPluginLSODataEnabled", *enabled); 456 "OptionsPage.setClearPluginLSODataEnabled", *enabled);
457 } 457 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698