OLD | NEW |
1 // Copyright (c) 2011 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/options2/clear_browser_data_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/clear_browser_data_handler2.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
(...skipping 11 matching lines...) Expand all Loading... |
23 namespace options2 { | 23 namespace options2 { |
24 | 24 |
25 ClearBrowserDataHandler::ClearBrowserDataHandler() : remover_(NULL) { | 25 ClearBrowserDataHandler::ClearBrowserDataHandler() : remover_(NULL) { |
26 } | 26 } |
27 | 27 |
28 ClearBrowserDataHandler::~ClearBrowserDataHandler() { | 28 ClearBrowserDataHandler::~ClearBrowserDataHandler() { |
29 if (remover_) | 29 if (remover_) |
30 remover_->RemoveObserver(this); | 30 remover_->RemoveObserver(this); |
31 } | 31 } |
32 | 32 |
33 void ClearBrowserDataHandler::Initialize() { | 33 void ClearBrowserDataHandler::InitializeHandler() { |
34 clear_plugin_lso_data_enabled_.Init(prefs::kClearPluginLSODataEnabled, | 34 clear_plugin_lso_data_enabled_.Init(prefs::kClearPluginLSODataEnabled, |
35 Profile::FromWebUI(web_ui())->GetPrefs(), | 35 Profile::FromWebUI(web_ui())->GetPrefs(), |
36 NULL); | 36 NULL); |
37 } | 37 } |
38 | 38 |
39 void ClearBrowserDataHandler::GetLocalizedValues( | 39 void ClearBrowserDataHandler::GetLocalizedValues( |
40 DictionaryValue* localized_strings) { | 40 DictionaryValue* localized_strings) { |
41 DCHECK(localized_strings); | 41 DCHECK(localized_strings); |
42 | 42 |
43 static OptionsStringResource resources[] = { | 43 static OptionsStringResource resources[] = { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 } | 137 } |
138 | 138 |
139 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() { | 139 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() { |
140 // No need to remove ourselves as an observer as BrowsingDataRemover deletes | 140 // No need to remove ourselves as an observer as BrowsingDataRemover deletes |
141 // itself after we return. | 141 // itself after we return. |
142 remover_ = NULL; | 142 remover_ = NULL; |
143 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); | 143 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); |
144 } | 144 } |
145 | 145 |
146 } // namespace options2 | 146 } // namespace options2 |
OLD | NEW |