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/options2/clear_browser_data_handler.h" | 5 #include "chrome/browser/ui/webui/options2/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 "grit/chromium_strings.h" | 21 #include "grit/chromium_strings.h" |
22 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
23 #include "grit/locale_settings.h" | 23 #include "grit/locale_settings.h" |
24 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
25 | 25 |
26 namespace { | 26 namespace { |
27 const char kClearBrowsingDataLearnMoreUrl[] = | 27 const char kClearBrowsingDataLearnMoreUrl[] = |
28 "https://support.google.com/chrome/?p=settings_clear_browsing_data"; | 28 "https://support.google.com/chrome/?p=settings_clear_browsing_data"; |
29 } | 29 } |
30 | 30 |
31 namespace options2 { | 31 namespace options { |
32 | 32 |
33 ClearBrowserDataHandler::ClearBrowserDataHandler() | 33 ClearBrowserDataHandler::ClearBrowserDataHandler() |
34 : remover_(NULL) { | 34 : remover_(NULL) { |
35 } | 35 } |
36 | 36 |
37 ClearBrowserDataHandler::~ClearBrowserDataHandler() { | 37 ClearBrowserDataHandler::~ClearBrowserDataHandler() { |
38 if (remover_) | 38 if (remover_) |
39 remover_->RemoveObserver(this); | 39 remover_->RemoveObserver(this); |
40 } | 40 } |
41 | 41 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 remover_->Remove(remove_mask, origin_mask); | 151 remover_->Remove(remove_mask, origin_mask); |
152 } | 152 } |
153 | 153 |
154 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() { | 154 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() { |
155 // No need to remove ourselves as an observer as BrowsingDataRemover deletes | 155 // No need to remove ourselves as an observer as BrowsingDataRemover deletes |
156 // itself after we return. | 156 // itself after we return. |
157 remover_ = NULL; | 157 remover_ = NULL; |
158 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); | 158 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); |
159 } | 159 } |
160 | 160 |
161 } // namespace options2 | 161 } // namespace options |
OLD | NEW |