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

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

Issue 10743: Use the most recently used download path when displaying a "save as" dialog.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/download/download_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/download/download_manager.h" 9 #include "chrome/browser/download/download_manager.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // We also delete the last session when we delete the history. 83 // We also delete the last session when we delete the history.
84 SessionService* session_service = profile_->GetSessionService(); 84 SessionService* session_service = profile_->GetSessionService();
85 if (session_service) 85 if (session_service)
86 session_service->DeleteSession(false); // Last session. 86 session_service->DeleteSession(false); // Last session.
87 } 87 }
88 88
89 if (remove_mask & REMOVE_DOWNLOADS) { 89 if (remove_mask & REMOVE_DOWNLOADS) {
90 UserMetrics::RecordAction(L"ClearBrowsingData_Downloads", profile_); 90 UserMetrics::RecordAction(L"ClearBrowsingData_Downloads", profile_);
91 DownloadManager* download_manager = profile_->GetDownloadManager(); 91 DownloadManager* download_manager = profile_->GetDownloadManager();
92 download_manager->RemoveDownloadsBetween(delete_begin_, delete_end_); 92 download_manager->RemoveDownloadsBetween(delete_begin_, delete_end_);
93 download_manager->ClearLastDownloadPath();
93 } 94 }
94 95
95 if (remove_mask & REMOVE_COOKIES) { 96 if (remove_mask & REMOVE_COOKIES) {
96 UserMetrics::RecordAction(L"ClearBrowsingData_Cookies", profile_); 97 UserMetrics::RecordAction(L"ClearBrowsingData_Cookies", profile_);
97 net::CookieMonster* cookie_monster = 98 net::CookieMonster* cookie_monster =
98 profile_->GetRequestContext()->cookie_store(); 99 profile_->GetRequestContext()->cookie_store();
99 cookie_monster->DeleteAllCreatedBetween(delete_begin_, delete_end_, true); 100 cookie_monster->DeleteAllCreatedBetween(delete_begin_, delete_end_, true);
100 } 101 }
101 102
102 if (remove_mask & REMOVE_PASSWORDS) { 103 if (remove_mask & REMOVE_PASSWORDS) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (delete_begin.is_null()) 205 if (delete_begin.is_null())
205 cache->DoomAllEntries(); 206 cache->DoomAllEntries();
206 else 207 else
207 cache->DoomEntriesBetween(delete_begin, delete_end); 208 cache->DoomEntriesBetween(delete_begin, delete_end);
208 } 209 }
209 210
210 // Notify the UI thread that we are done. 211 // Notify the UI thread that we are done.
211 ui_loop->PostTask(FROM_HERE, NewRunnableMethod( 212 ui_loop->PostTask(FROM_HERE, NewRunnableMethod(
212 this, &BrowsingDataRemover::ClearedCache)); 213 this, &BrowsingDataRemover::ClearedCache));
213 } 214 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698