| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 database_name(database_name), | 35 database_name(database_name), |
| 36 origin_identifier(origin_identifier), | 36 origin_identifier(origin_identifier), |
| 37 description(description), | 37 description(description), |
| 38 origin(origin), | 38 origin(origin), |
| 39 size(size), | 39 size(size), |
| 40 last_modified(last_modified) { | 40 last_modified(last_modified) { |
| 41 } | 41 } |
| 42 | 42 |
| 43 BrowsingDataDatabaseHelper::DatabaseInfo::~DatabaseInfo() {} | 43 BrowsingDataDatabaseHelper::DatabaseInfo::~DatabaseInfo() {} |
| 44 | 44 |
| 45 bool BrowsingDataDatabaseHelper::DatabaseInfo::IsFileSchemeData() { | |
| 46 return StartsWithASCII(origin_identifier, | |
| 47 std::string(chrome::kFileScheme), | |
| 48 true); | |
| 49 } | |
| 50 | |
| 51 BrowsingDataDatabaseHelper::BrowsingDataDatabaseHelper(Profile* profile) | 45 BrowsingDataDatabaseHelper::BrowsingDataDatabaseHelper(Profile* profile) |
| 52 : is_fetching_(false), | 46 : is_fetching_(false), |
| 53 tracker_(profile->GetDatabaseTracker()) { | 47 tracker_(profile->GetDatabaseTracker()) { |
| 54 } | 48 } |
| 55 | 49 |
| 56 BrowsingDataDatabaseHelper::~BrowsingDataDatabaseHelper() { | 50 BrowsingDataDatabaseHelper::~BrowsingDataDatabaseHelper() { |
| 57 } | 51 } |
| 58 | 52 |
| 59 void BrowsingDataDatabaseHelper::StartFetching( | 53 void BrowsingDataDatabaseHelper::StartFetching( |
| 60 const base::Callback<void(const std::list<DatabaseInfo>&)>& callback) { | 54 const base::Callback<void(const std::list<DatabaseInfo>&)>& callback) { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 web_security_origin.toString().utf8(), | 239 web_security_origin.toString().utf8(), |
| 246 0, | 240 0, |
| 247 base::Time())); | 241 base::Time())); |
| 248 } | 242 } |
| 249 pending_database_info_.clear(); | 243 pending_database_info_.clear(); |
| 250 | 244 |
| 251 BrowserThread::PostTask( | 245 BrowserThread::PostTask( |
| 252 BrowserThread::UI, FROM_HERE, | 246 BrowserThread::UI, FROM_HERE, |
| 253 base::Bind(&CannedBrowsingDataDatabaseHelper::NotifyInUIThread, this)); | 247 base::Bind(&CannedBrowsingDataDatabaseHelper::NotifyInUIThread, this)); |
| 254 } | 248 } |
| OLD | NEW |