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

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

Issue 248021: Reverting 27379. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/chrome_plugin_host.cc » ('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/history/history.h" 10 #include "chrome/browser/history/history.h"
11 #include "chrome/browser/profile.h" 11 #include "chrome/browser/profile.h"
12 #include "chrome/browser/metrics/user_metrics.h" 12 #include "chrome/browser/metrics/user_metrics.h"
13 #include "chrome/browser/password_manager/password_store.h" 13 #include "chrome/browser/password_manager/password_store.h"
14 #include "chrome/browser/search_engines/template_url_model.h" 14 #include "chrome/browser/search_engines/template_url_model.h"
15 #include "chrome/browser/sessions/session_service.h" 15 #include "chrome/browser/sessions/session_service.h"
16 #include "chrome/browser/sessions/tab_restore_service.h" 16 #include "chrome/browser/sessions/tab_restore_service.h"
17 #include "chrome/browser/webdata/web_data_service.h" 17 #include "chrome/browser/webdata/web_data_service.h"
18 #include "chrome/common/notification_service.h" 18 #include "chrome/common/notification_service.h"
19 #include "net/base/cookie_monster.h" 19 #include "net/base/cookie_monster.h"
20 #include "net/disk_cache/disk_cache.h" 20 #include "net/disk_cache/disk_cache.h"
21 #include "net/http/http_cache.h" 21 #include "net/http/http_cache.h"
22 #include "net/url_request/url_request_context.h" 22 #include "net/url_request/url_request_context.h"
23 #include "webkit/glue/password_form.h" 23 #include "webkit/glue/password_form.h"
24 24
25 // Done so that we can use PostTask on BrowsingDataRemovers and not have 25 // Done so that we can use invokeLater on BrowsingDataRemovers and not have
26 // BrowsingDataRemover implement RefCounted. 26 // BrowsingDataRemover implement RefCounted.
27 template <> 27 template<>
28 struct RunnableMethodTraits<BrowsingDataRemover> { 28 void RunnableMethodTraits<BrowsingDataRemover>::RetainCallee(
29 void RetainCallee(BrowsingDataRemover*) {} 29 BrowsingDataRemover* remover) {
30 void ReleaseCallee(BrowsingDataRemover*) {} 30 }
31 }; 31 template<>
32 void RunnableMethodTraits<BrowsingDataRemover>::ReleaseCallee(
33 BrowsingDataRemover* remover) {
34 }
32 35
33 bool BrowsingDataRemover::removing_ = false; 36 bool BrowsingDataRemover::removing_ = false;
34 37
35 BrowsingDataRemover::BrowsingDataRemover(Profile* profile, 38 BrowsingDataRemover::BrowsingDataRemover(Profile* profile,
36 base::Time delete_begin, 39 base::Time delete_begin,
37 base::Time delete_end) 40 base::Time delete_end)
38 : profile_(profile), 41 : profile_(profile),
39 delete_begin_(delete_begin), 42 delete_begin_(delete_begin),
40 delete_end_(delete_end), 43 delete_end_(delete_end),
41 waiting_for_clear_history_(false), 44 waiting_for_clear_history_(false),
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 if (delete_begin.is_null()) 239 if (delete_begin.is_null())
237 cache->DoomAllEntries(); 240 cache->DoomAllEntries();
238 else 241 else
239 cache->DoomEntriesBetween(delete_begin, delete_end); 242 cache->DoomEntriesBetween(delete_begin, delete_end);
240 } 243 }
241 244
242 // Notify the UI thread that we are done. 245 // Notify the UI thread that we are done.
243 ui_loop->PostTask(FROM_HERE, NewRunnableMethod( 246 ui_loop->PostTask(FROM_HERE, NewRunnableMethod(
244 this, &BrowsingDataRemover::ClearedCache)); 247 this, &BrowsingDataRemover::ClearedCache));
245 } 248 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/chrome_plugin_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698