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

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

Issue 10837230: Move StoragePartition into content/public and remove BrowserContext::GetDOMStorageContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove DISALLOW_COPY_AND_ASSIGN, and change RPH::CreateMessageFilters() to not suddenly isolate all… Created 8 years, 4 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/browsing_data/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "chrome/browser/webdata/web_data_service.h" 45 #include "chrome/browser/webdata/web_data_service.h"
46 #include "chrome/browser/webdata/web_data_service_factory.h" 46 #include "chrome/browser/webdata/web_data_service_factory.h"
47 #include "chrome/common/chrome_notification_types.h" 47 #include "chrome/common/chrome_notification_types.h"
48 #include "chrome/common/pref_names.h" 48 #include "chrome/common/pref_names.h"
49 #include "chrome/common/url_constants.h" 49 #include "chrome/common/url_constants.h"
50 #include "content/public/browser/browser_thread.h" 50 #include "content/public/browser/browser_thread.h"
51 #include "content/public/browser/dom_storage_context.h" 51 #include "content/public/browser/dom_storage_context.h"
52 #include "content/public/browser/download_manager.h" 52 #include "content/public/browser/download_manager.h"
53 #include "content/public/browser/notification_service.h" 53 #include "content/public/browser/notification_service.h"
54 #include "content/public/browser/plugin_data_remover.h" 54 #include "content/public/browser/plugin_data_remover.h"
55 #include "content/public/browser/storage_partition.h"
55 #include "content/public/browser/user_metrics.h" 56 #include "content/public/browser/user_metrics.h"
56 #include "net/base/net_errors.h" 57 #include "net/base/net_errors.h"
57 #include "net/base/server_bound_cert_service.h" 58 #include "net/base/server_bound_cert_service.h"
58 #include "net/base/server_bound_cert_store.h" 59 #include "net/base/server_bound_cert_store.h"
59 #include "net/base/transport_security_state.h" 60 #include "net/base/transport_security_state.h"
60 #include "net/cookies/cookie_store.h" 61 #include "net/cookies/cookie_store.h"
61 #include "net/disk_cache/disk_cache.h" 62 #include "net/disk_cache/disk_cache.h"
62 #include "net/http/http_cache.h" 63 #include "net/http/http_cache.h"
63 #include "net/url_request/url_request_context.h" 64 #include "net/url_request/url_request_context.h"
64 #include "net/url_request/url_request_context_getter.h" 65 #include "net/url_request/url_request_context_getter.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 waiting_for_clear_server_bound_certs_ = true; 367 waiting_for_clear_server_bound_certs_ = true;
367 BrowserThread::PostTask( 368 BrowserThread::PostTask(
368 BrowserThread::IO, FROM_HERE, 369 BrowserThread::IO, FROM_HERE,
369 base::Bind(&BrowsingDataRemover::ClearServerBoundCertsOnIOThread, 370 base::Bind(&BrowsingDataRemover::ClearServerBoundCertsOnIOThread,
370 base::Unretained(this), base::Unretained(rq_context))); 371 base::Unretained(this), base::Unretained(rq_context)));
371 } 372 }
372 } 373 }
373 374
374 if (remove_mask & REMOVE_LOCAL_STORAGE) { 375 if (remove_mask & REMOVE_LOCAL_STORAGE) {
375 waiting_for_clear_local_storage_ = true; 376 waiting_for_clear_local_storage_ = true;
376 if (!dom_storage_context_) 377 if (!dom_storage_context_) {
377 dom_storage_context_ = 378 dom_storage_context_ =
378 BrowserContext::GetDefaultDOMStorageContext(profile_); 379 BrowserContext::GetDefaultStoragePartition(profile_)->
380 GetDOMStorageContext();
381 }
379 ClearLocalStorageOnUIThread(); 382 ClearLocalStorageOnUIThread();
380 } 383 }
381 384
382 if (remove_mask & REMOVE_INDEXEDDB || remove_mask & REMOVE_WEBSQL || 385 if (remove_mask & REMOVE_INDEXEDDB || remove_mask & REMOVE_WEBSQL ||
383 remove_mask & REMOVE_APPCACHE || remove_mask & REMOVE_FILE_SYSTEMS) { 386 remove_mask & REMOVE_APPCACHE || remove_mask & REMOVE_FILE_SYSTEMS) {
384 if (!quota_manager_) 387 if (!quota_manager_)
385 quota_manager_ = content::BrowserContext::GetQuotaManager(profile_); 388 quota_manager_ = content::BrowserContext::GetQuotaManager(profile_);
386 waiting_for_clear_quota_managed_data_ = true; 389 waiting_for_clear_quota_managed_data_ = true;
387 BrowserThread::PostTask( 390 BrowserThread::PostTask(
388 BrowserThread::IO, FROM_HERE, 391 BrowserThread::IO, FROM_HERE,
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 BrowserThread::UI, FROM_HERE, 898 BrowserThread::UI, FROM_HERE,
896 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, 899 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts,
897 base::Unretained(this))); 900 base::Unretained(this)));
898 } 901 }
899 902
900 void BrowsingDataRemover::OnClearedServerBoundCerts() { 903 void BrowsingDataRemover::OnClearedServerBoundCerts() {
901 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 904 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
902 waiting_for_clear_server_bound_certs_ = false; 905 waiting_for_clear_server_bound_certs_ = false;
903 NotifyAndDeleteIfDone(); 906 NotifyAndDeleteIfDone();
904 } 907 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698