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

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

Issue 14156003: Support multiple storage partitions in chrome://indexeddb-internals/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix cocoa unit test Created 7 years, 8 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 | « no previous file | chrome/browser/browsing_data/browsing_data_indexed_db_helper_browsertest.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) 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_indexed_db_helper.h" 5 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 &BrowsingDataIndexedDBHelperImpl::DeleteIndexedDBInWebKitThread, this, 103 &BrowsingDataIndexedDBHelperImpl::DeleteIndexedDBInWebKitThread, this,
104 origin)); 104 origin));
105 } 105 }
106 106
107 void BrowsingDataIndexedDBHelperImpl::FetchIndexedDBInfoInWebKitThread() { 107 void BrowsingDataIndexedDBHelperImpl::FetchIndexedDBInfoInWebKitThread() {
108 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)); 108 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED));
109 std::vector<IndexedDBInfo> origins = indexed_db_context_->GetAllOriginsInfo(); 109 std::vector<IndexedDBInfo> origins = indexed_db_context_->GetAllOriginsInfo();
110 for (std::vector<IndexedDBInfo>::const_iterator iter = origins.begin(); 110 for (std::vector<IndexedDBInfo>::const_iterator iter = origins.begin();
111 iter != origins.end(); ++iter) { 111 iter != origins.end(); ++iter) {
112 const IndexedDBInfo& origin = *iter; 112 const IndexedDBInfo& origin = *iter;
113 if (!BrowsingDataHelper::HasWebScheme(origin.origin)) 113 if (!BrowsingDataHelper::HasWebScheme(origin.origin_))
114 continue; // Non-websafe state is not considered browsing data. 114 continue; // Non-websafe state is not considered browsing data.
115 115
116 indexed_db_info_.push_back(origin); 116 indexed_db_info_.push_back(origin);
117 } 117 }
118 118
119 BrowserThread::PostTask( 119 BrowserThread::PostTask(
120 BrowserThread::UI, FROM_HERE, 120 BrowserThread::UI, FROM_HERE,
121 base::Bind(&BrowsingDataIndexedDBHelperImpl::NotifyInUIThread, this)); 121 base::Bind(&BrowsingDataIndexedDBHelperImpl::NotifyInUIThread, this));
122 } 122 }
123 123
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 &CannedBrowsingDataIndexedDBHelper::ConvertPendingInfoInWebKitThread, 224 &CannedBrowsingDataIndexedDBHelper::ConvertPendingInfoInWebKitThread,
225 this)); 225 this));
226 } 226 }
227 227
228 void CannedBrowsingDataIndexedDBHelper::ConvertPendingInfoInWebKitThread() { 228 void CannedBrowsingDataIndexedDBHelper::ConvertPendingInfoInWebKitThread() {
229 base::AutoLock auto_lock(lock_); 229 base::AutoLock auto_lock(lock_);
230 indexed_db_info_.clear(); 230 indexed_db_info_.clear();
231 for (std::set<PendingIndexedDBInfo>::const_iterator 231 for (std::set<PendingIndexedDBInfo>::const_iterator
232 pending_info = pending_indexed_db_info_.begin(); 232 pending_info = pending_indexed_db_info_.begin();
233 pending_info != pending_indexed_db_info_.end(); ++pending_info) { 233 pending_info != pending_indexed_db_info_.end(); ++pending_info) {
234 IndexedDBInfo info(pending_info->origin, 0, base::Time()); 234 IndexedDBInfo info(pending_info->origin, 0, base::Time(), base::FilePath());
235 indexed_db_info_.push_back(info); 235 indexed_db_info_.push_back(info);
236 } 236 }
237 237
238 BrowserThread::PostTask( 238 BrowserThread::PostTask(
239 BrowserThread::UI, FROM_HERE, 239 BrowserThread::UI, FROM_HERE,
240 base::Bind(&CannedBrowsingDataIndexedDBHelper::NotifyInUIThread, this)); 240 base::Bind(&CannedBrowsingDataIndexedDBHelper::NotifyInUIThread, this));
241 } 241 }
242 242
243 void CannedBrowsingDataIndexedDBHelper::NotifyInUIThread() { 243 void CannedBrowsingDataIndexedDBHelper::NotifyInUIThread() {
244 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 244 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
245 DCHECK(is_fetching_); 245 DCHECK(is_fetching_);
246 246
247 completion_callback_.Run(indexed_db_info_); 247 completion_callback_.Run(indexed_db_info_);
248 completion_callback_.Reset(); 248 completion_callback_.Reset();
249 is_fetching_ = false; 249 is_fetching_ = false;
250 } 250 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_indexed_db_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698