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

Side by Side Diff: chrome/browser/browsing_data_remover.cc

Issue 524026: Adds "Delete Local Storage" option to "Clear Browsing Data" for Windows and G... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 11 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data_remover.h"
6 6
7 #include "chrome/browser/chrome_thread.h" 7 #include "chrome/browser/chrome_thread.h"
8 #include "chrome/browser/download/download_manager.h" 8 #include "chrome/browser/download/download_manager.h"
9 #include "chrome/browser/history/history.h" 9 #include "chrome/browser/history/history.h"
10 #include "chrome/browser/in_process_webkit/webkit_context.h" 10 #include "chrome/browser/in_process_webkit/webkit_context.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 download_manager->ClearLastDownloadPath(); 105 download_manager->ClearLastDownloadPath();
106 } 106 }
107 107
108 if (remove_mask & REMOVE_COOKIES) { 108 if (remove_mask & REMOVE_COOKIES) {
109 UserMetrics::RecordAction("ClearBrowsingData_Cookies", profile_); 109 UserMetrics::RecordAction("ClearBrowsingData_Cookies", profile_);
110 // Since we are running on the UI thread don't call GetURLRequestContext(). 110 // Since we are running on the UI thread don't call GetURLRequestContext().
111 net::CookieMonster* cookie_monster = 111 net::CookieMonster* cookie_monster =
112 profile_->GetRequestContext()->GetCookieStore()->GetCookieMonster(); 112 profile_->GetRequestContext()->GetCookieStore()->GetCookieMonster();
113 if (cookie_monster) 113 if (cookie_monster)
114 cookie_monster->DeleteAllCreatedBetween(delete_begin_, delete_end_, true); 114 cookie_monster->DeleteAllCreatedBetween(delete_begin_, delete_end_, true);
115 }
116
117 if (remove_mask & REMOVE_LOCAL_STORAGE) {
118 UserMetrics::RecordAction("ClearBrowsingData_LocalStorage", profile_);
115 profile_->GetWebKitContext()->DeleteDataModifiedSince(delete_begin_); 119 profile_->GetWebKitContext()->DeleteDataModifiedSince(delete_begin_);
116 } 120 }
117 121
118 if (remove_mask & REMOVE_PASSWORDS) { 122 if (remove_mask & REMOVE_PASSWORDS) {
119 UserMetrics::RecordAction("ClearBrowsingData_Passwords", profile_); 123 UserMetrics::RecordAction("ClearBrowsingData_Passwords", profile_);
120 PasswordStore* password_store = 124 PasswordStore* password_store =
121 profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS); 125 profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS);
122 126
123 password_store->RemoveLoginsCreatedBetween(delete_begin_, delete_end_); 127 password_store->RemoveLoginsCreatedBetween(delete_begin_, delete_end_);
124 } 128 }
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 271
268 // Balance the AddRef()s done on the UI thread by Remove(). 272 // Balance the AddRef()s done on the UI thread by Remove().
269 main_context_getter->Release(); 273 main_context_getter->Release();
270 media_context_getter->Release(); 274 media_context_getter->Release();
271 275
272 // Notify the UI thread that we are done. 276 // Notify the UI thread that we are done.
273 ChromeThread::PostTask( 277 ChromeThread::PostTask(
274 ChromeThread::UI, FROM_HERE, 278 ChromeThread::UI, FROM_HERE,
275 NewRunnableMethod(this, &BrowsingDataRemover::ClearedCache)); 279 NewRunnableMethod(this, &BrowsingDataRemover::ClearedCache));
276 } 280 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_remover.h ('k') | chrome/browser/cocoa/clear_browsing_data_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698