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

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

Issue 10600009: Support partitioning of storage contexts based on render_id. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebased Created 8 years, 5 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
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_local_storage_helper.h" 5 #include "chrome/browser/browsing_data_local_storage_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/browsing_data_helper.h" 9 #include "chrome/browser/browsing_data_helper.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "content/public/browser/dom_storage_context.h" 12 #include "content/public/browser/dom_storage_context.h"
13 13
14 using content::BrowserContext; 14 using content::BrowserContext;
15 using content::BrowserThread; 15 using content::BrowserThread;
16 using content::DOMStorageContext; 16 using content::DOMStorageContext;
17 using dom_storage::DomStorageContext; 17 using dom_storage::DomStorageContext;
18 18
19 BrowsingDataLocalStorageHelper::LocalStorageInfo::LocalStorageInfo( 19 BrowsingDataLocalStorageHelper::LocalStorageInfo::LocalStorageInfo(
20 const GURL& origin_url, int64 size, base::Time last_modified) 20 const GURL& origin_url, int64 size, base::Time last_modified)
21 : origin_url(origin_url), size(size), last_modified(last_modified) {} 21 : origin_url(origin_url), size(size), last_modified(last_modified) {}
22 22
23 BrowsingDataLocalStorageHelper::LocalStorageInfo::~LocalStorageInfo() {} 23 BrowsingDataLocalStorageHelper::LocalStorageInfo::~LocalStorageInfo() {}
24 24
25 BrowsingDataLocalStorageHelper::BrowsingDataLocalStorageHelper( 25 BrowsingDataLocalStorageHelper::BrowsingDataLocalStorageHelper(
26 Profile* profile) 26 Profile* profile)
27 : dom_storage_context_(BrowserContext::GetDOMStorageContext(profile)), 27 : dom_storage_context_(
28 BrowserContext::GetDefaultDOMStorageContext(profile)),
28 is_fetching_(false) { 29 is_fetching_(false) {
29 DCHECK(dom_storage_context_); 30 DCHECK(dom_storage_context_);
30 } 31 }
31 32
32 BrowsingDataLocalStorageHelper::~BrowsingDataLocalStorageHelper() { 33 BrowsingDataLocalStorageHelper::~BrowsingDataLocalStorageHelper() {
33 } 34 }
34 35
35 void BrowsingDataLocalStorageHelper::StartFetching( 36 void BrowsingDataLocalStorageHelper::StartFetching(
36 const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback) { 37 const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback) {
37 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 38 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 for (std::set<GURL>::iterator iter = pending_local_storage_info_.begin(); 141 for (std::set<GURL>::iterator iter = pending_local_storage_info_.begin();
141 iter != pending_local_storage_info_.end(); ++iter) { 142 iter != pending_local_storage_info_.end(); ++iter) {
142 local_storage_info_.push_back( 143 local_storage_info_.push_back(
143 LocalStorageInfo(*iter, 0, base::Time())); 144 LocalStorageInfo(*iter, 0, base::Time()));
144 } 145 }
145 MessageLoop::current()->PostTask( 146 MessageLoop::current()->PostTask(
146 FROM_HERE, 147 FROM_HERE,
147 base::Bind(&CannedBrowsingDataLocalStorageHelper::CallCompletionCallback, 148 base::Bind(&CannedBrowsingDataLocalStorageHelper::CallCompletionCallback,
148 this)); 149 this));
149 } 150 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data_remover.cc » ('j') | content/browser/storage_partition_map.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698