| 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_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" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // If we are still observing a previous data remover, we need to stop | 124 // If we are still observing a previous data remover, we need to stop |
| 125 // observing. | 125 // observing. |
| 126 if (remover_) | 126 if (remover_) |
| 127 remover_->RemoveObserver(this); | 127 remover_->RemoveObserver(this); |
| 128 | 128 |
| 129 // BrowsingDataRemover deletes itself when done. | 129 // BrowsingDataRemover deletes itself when done. |
| 130 remover_ = new BrowsingDataRemover(profile, | 130 remover_ = new BrowsingDataRemover(profile, |
| 131 static_cast<BrowsingDataRemover::TimePeriod>(period_selected), | 131 static_cast<BrowsingDataRemover::TimePeriod>(period_selected), |
| 132 base::Time()); | 132 base::Time()); |
| 133 remover_->AddObserver(this); | 133 remover_->AddObserver(this); |
| 134 remover_->Remove(remove_mask); | 134 remover_->Remove(remove_mask, BrowsingDataRemover::UNPROTECTED_WEB); |
| 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 } |
| 143 | 143 |
| 144 } // namespace options2 | 144 } // namespace options2 |
| OLD | NEW |