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

Side by Side Diff: chrome/browser/ui/webui/options2/clear_browser_data_handler2.cc

Issue 10413072: Teaching BrowsingDataRemover how to delete application data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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/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
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,
135 BrowsingDataRemover::REMOVE_FROM_UNPROTECTED_ORIGINS);
135 } 136 }
136 137
137 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() { 138 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() {
138 // No need to remove ourselves as an observer as BrowsingDataRemover deletes 139 // No need to remove ourselves as an observer as BrowsingDataRemover deletes
139 // itself after we return. 140 // itself after we return.
140 remover_ = NULL; 141 remover_ = NULL;
141 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); 142 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing");
142 } 143 }
143 144
144 } // namespace options2 145 } // namespace options2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698