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

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

Issue 251012: Assert that thread-safe reference counting is used with... (Closed) Base URL: svn://svn.chromium.org/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 invokeLater on BrowsingDataRemovers and not have 25 // Done so that we can use PostTask on BrowsingDataRemovers and not have
26 // BrowsingDataRemover implement RefCounted. 26 // BrowsingDataRemover implement RefCounted.
27 template<> 27 template <>
28 void RunnableMethodTraits<BrowsingDataRemover>::RetainCallee( 28 struct RunnableMethodTraits<BrowsingDataRemover> {
29 BrowsingDataRemover* remover) { 29 void RetainCallee(BrowsingDataRemover*) {}
30 } 30 void ReleaseCallee(BrowsingDataRemover*) {}
31 template<> 31 };
32 void RunnableMethodTraits<BrowsingDataRemover>::ReleaseCallee(
33 BrowsingDataRemover* remover) {
34 }
35 32
36 bool BrowsingDataRemover::removing_ = false; 33 bool BrowsingDataRemover::removing_ = false;
37 34
38 BrowsingDataRemover::BrowsingDataRemover(Profile* profile, 35 BrowsingDataRemover::BrowsingDataRemover(Profile* profile,
39 base::Time delete_begin, 36 base::Time delete_begin,
40 base::Time delete_end) 37 base::Time delete_end)
41 : profile_(profile), 38 : profile_(profile),
42 delete_begin_(delete_begin), 39 delete_begin_(delete_begin),
43 delete_end_(delete_end), 40 delete_end_(delete_end),
44 waiting_for_clear_history_(false), 41 waiting_for_clear_history_(false),
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 if (delete_begin.is_null()) 236 if (delete_begin.is_null())
240 cache->DoomAllEntries(); 237 cache->DoomAllEntries();
241 else 238 else
242 cache->DoomEntriesBetween(delete_begin, delete_end); 239 cache->DoomEntriesBetween(delete_begin, delete_end);
243 } 240 }
244 241
245 // Notify the UI thread that we are done. 242 // Notify the UI thread that we are done.
246 ui_loop->PostTask(FROM_HERE, NewRunnableMethod( 243 ui_loop->PostTask(FROM_HERE, NewRunnableMethod(
247 this, &BrowsingDataRemover::ClearedCache)); 244 this, &BrowsingDataRemover::ClearedCache));
248 } 245 }
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