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