OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/clear_browser_data_handler.h" | 5 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.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" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
22 | 22 |
23 ClearBrowserDataHandler::ClearBrowserDataHandler() : remover_(NULL) { | 23 ClearBrowserDataHandler::ClearBrowserDataHandler() : remover_(NULL) { |
24 } | 24 } |
25 | 25 |
26 ClearBrowserDataHandler::~ClearBrowserDataHandler() { | 26 ClearBrowserDataHandler::~ClearBrowserDataHandler() { |
27 if (remover_) | 27 if (remover_) |
28 remover_->RemoveObserver(this); | 28 remover_->RemoveObserver(this); |
29 } | 29 } |
30 | 30 |
31 void ClearBrowserDataHandler::Initialize() { | 31 void ClearBrowserDataHandler::InitializeHandler() { |
32 clear_plugin_lso_data_enabled_.Init(prefs::kClearPluginLSODataEnabled, | 32 clear_plugin_lso_data_enabled_.Init(prefs::kClearPluginLSODataEnabled, |
33 Profile::FromWebUI(web_ui())->GetPrefs(), | 33 Profile::FromWebUI(web_ui())->GetPrefs(), |
34 NULL); | 34 NULL); |
35 } | 35 } |
36 | 36 |
37 void ClearBrowserDataHandler::GetLocalizedValues( | 37 void ClearBrowserDataHandler::GetLocalizedValues( |
38 DictionaryValue* localized_strings) { | 38 DictionaryValue* localized_strings) { |
39 DCHECK(localized_strings); | 39 DCHECK(localized_strings); |
40 | 40 |
41 static OptionsStringResource resources[] = { | 41 static OptionsStringResource resources[] = { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 remover_->AddObserver(this); | 133 remover_->AddObserver(this); |
134 remover_->Remove(remove_mask); | 134 remover_->Remove(remove_mask); |
135 } | 135 } |
136 | 136 |
137 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() { | 137 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() { |
138 // No need to remove ourselves as an observer as BrowsingDataRemover deletes | 138 // No need to remove ourselves as an observer as BrowsingDataRemover deletes |
139 // itself after we return. | 139 // itself after we return. |
140 remover_ = NULL; | 140 remover_ = NULL; |
141 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); | 141 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); |
142 } | 142 } |
OLD | NEW |