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

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

Issue 10092013: Display third party cookies and site data counts in the WebsiteSettings UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years, 7 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_database_helper.h" 5 #include "chrome/browser/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_helper.h" 12 #include "chrome/browser/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 "net/base/completion_callback.h" 15 #include "net/base/completion_callback.h"
16 #include "net/base/net_errors.h" 16 #include "net/base/net_errors.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h " 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h "
18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
20 20
21 using content::BrowserContext; 21 using content::BrowserContext;
22 using content::BrowserThread; 22 using content::BrowserThread;
23 using WebKit::WebSecurityOrigin; 23 using WebKit::WebSecurityOrigin;
24 24
25 BrowsingDataDatabaseHelper::DatabaseInfo::DatabaseInfo()
26 : size(0) {
27 }
28
29 BrowsingDataDatabaseHelper::DatabaseInfo::DatabaseInfo( 25 BrowsingDataDatabaseHelper::DatabaseInfo::DatabaseInfo(
30 const std::string& host, 26 const std::string& host,
31 const std::string& database_name, 27 const std::string& database_name,
32 const std::string& origin_identifier, 28 const std::string& origin_identifier,
33 const std::string& description, 29 const std::string& description,
34 const std::string& origin, 30 const std::string& origin,
35 int64 size, 31 int64 size,
36 base::Time last_modified) 32 base::Time last_modified)
37 : host(host), 33 : host(host),
38 database_name(database_name), 34 database_name(database_name),
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void BrowsingDataDatabaseHelper::DeleteDatabaseOnFileThread( 124 void BrowsingDataDatabaseHelper::DeleteDatabaseOnFileThread(
129 const std::string& origin, 125 const std::string& origin,
130 const std::string& name) { 126 const std::string& name) {
131 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 127 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
132 if (!tracker_.get()) 128 if (!tracker_.get())
133 return; 129 return;
134 tracker_->DeleteDatabase(UTF8ToUTF16(origin), UTF8ToUTF16(name), 130 tracker_->DeleteDatabase(UTF8ToUTF16(origin), UTF8ToUTF16(name),
135 net::CompletionCallback()); 131 net::CompletionCallback());
136 } 132 }
137 133
138 CannedBrowsingDataDatabaseHelper::PendingDatabaseInfo::PendingDatabaseInfo() {}
139
140 CannedBrowsingDataDatabaseHelper::PendingDatabaseInfo::PendingDatabaseInfo( 134 CannedBrowsingDataDatabaseHelper::PendingDatabaseInfo::PendingDatabaseInfo(
141 const GURL& origin, 135 const GURL& origin,
142 const std::string& name, 136 const std::string& name,
143 const std::string& description) 137 const std::string& description)
144 : origin(origin), 138 : origin(origin),
145 name(name), 139 name(name),
146 description(description) { 140 description(description) {
147 } 141 }
148 142
149 CannedBrowsingDataDatabaseHelper::PendingDatabaseInfo::~PendingDatabaseInfo() {} 143 CannedBrowsingDataDatabaseHelper::PendingDatabaseInfo::~PendingDatabaseInfo() {}
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 web_security_origin.toString().utf8(), 232 web_security_origin.toString().utf8(),
239 0, 233 0,
240 base::Time())); 234 base::Time()));
241 } 235 }
242 pending_database_info_.clear(); 236 pending_database_info_.clear();
243 237
244 BrowserThread::PostTask( 238 BrowserThread::PostTask(
245 BrowserThread::UI, FROM_HERE, 239 BrowserThread::UI, FROM_HERE,
246 base::Bind(&CannedBrowsingDataDatabaseHelper::NotifyInUIThread, this)); 240 base::Bind(&CannedBrowsingDataDatabaseHelper::NotifyInUIThread, this));
247 } 241 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698