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