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

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

Issue 10879075: Shard DatabaseTracker (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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_database_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_database_helper.h" 5 #include "chrome/browser/browsing_data/browsing_data_database_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/browser/browsing_data/browsing_data_helper.h" 12 #include "chrome/browser/browsing_data/browsing_data_helper.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/storage_partition.h"
15 #include "net/base/completion_callback.h" 16 #include "net/base/completion_callback.h"
16 #include "net/base/net_errors.h" 17 #include "net/base/net_errors.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h " 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h "
18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
20 21
21 using content::BrowserContext; 22 using content::BrowserContext;
22 using content::BrowserThread; 23 using content::BrowserThread;
23 using WebKit::WebSecurityOrigin; 24 using WebKit::WebSecurityOrigin;
24 25
(...skipping 11 matching lines...) Expand all
36 description(description), 37 description(description),
37 origin(origin), 38 origin(origin),
38 size(size), 39 size(size),
39 last_modified(last_modified) { 40 last_modified(last_modified) {
40 } 41 }
41 42
42 BrowsingDataDatabaseHelper::DatabaseInfo::~DatabaseInfo() {} 43 BrowsingDataDatabaseHelper::DatabaseInfo::~DatabaseInfo() {}
43 44
44 BrowsingDataDatabaseHelper::BrowsingDataDatabaseHelper(Profile* profile) 45 BrowsingDataDatabaseHelper::BrowsingDataDatabaseHelper(Profile* profile)
45 : is_fetching_(false), 46 : is_fetching_(false),
46 tracker_(BrowserContext::GetDatabaseTracker(profile)) { 47 tracker_(BrowserContext::
48 GetDefaultStoragePartition(profile)->GetDatabaseTracker()) {
47 } 49 }
48 50
49 BrowsingDataDatabaseHelper::~BrowsingDataDatabaseHelper() { 51 BrowsingDataDatabaseHelper::~BrowsingDataDatabaseHelper() {
50 } 52 }
51 53
52 void BrowsingDataDatabaseHelper::StartFetching( 54 void BrowsingDataDatabaseHelper::StartFetching(
53 const base::Callback<void(const std::list<DatabaseInfo>&)>& callback) { 55 const base::Callback<void(const std::list<DatabaseInfo>&)>& callback) {
54 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 56 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
55 DCHECK(!is_fetching_); 57 DCHECK(!is_fetching_);
56 DCHECK_EQ(false, callback.is_null()); 58 DCHECK_EQ(false, callback.is_null());
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 info->description, 233 info->description,
232 web_security_origin.toString().utf8(), 234 web_security_origin.toString().utf8(),
233 0, 235 0,
234 base::Time())); 236 base::Time()));
235 } 237 }
236 238
237 BrowserThread::PostTask( 239 BrowserThread::PostTask(
238 BrowserThread::UI, FROM_HERE, 240 BrowserThread::UI, FROM_HERE,
239 base::Bind(&CannedBrowsingDataDatabaseHelper::NotifyInUIThread, this)); 241 base::Bind(&CannedBrowsingDataDatabaseHelper::NotifyInUIThread, this));
240 } 242 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_database_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698