| OLD | NEW |
| 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/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if (!BrowsingDataHelper::HasWebScheme(identifier.ToOrigin())) { | 80 if (!BrowsingDataHelper::HasWebScheme(identifier.ToOrigin())) { |
| 81 // Non-websafe state is not considered browsing data. | 81 // Non-websafe state is not considered browsing data. |
| 82 continue; | 82 continue; |
| 83 } | 83 } |
| 84 std::vector<base::string16> databases; | 84 std::vector<base::string16> databases; |
| 85 ori->GetAllDatabaseNames(&databases); | 85 ori->GetAllDatabaseNames(&databases); |
| 86 for (std::vector<base::string16>::const_iterator db = databases.begin(); | 86 for (std::vector<base::string16>::const_iterator db = databases.begin(); |
| 87 db != databases.end(); ++db) { | 87 db != databases.end(); ++db) { |
| 88 base::FilePath file_path = | 88 base::FilePath file_path = |
| 89 tracker_->GetFullDBFilePath(ori->GetOriginIdentifier(), *db); | 89 tracker_->GetFullDBFilePath(ori->GetOriginIdentifier(), *db); |
| 90 base::PlatformFileInfo file_info; | 90 base::File::Info file_info; |
| 91 if (base::GetFileInfo(file_path, &file_info)) { | 91 if (base::GetFileInfo(file_path, &file_info)) { |
| 92 database_info_.push_back(DatabaseInfo( | 92 database_info_.push_back(DatabaseInfo( |
| 93 identifier, | 93 identifier, |
| 94 base::UTF16ToUTF8(*db), | 94 base::UTF16ToUTF8(*db), |
| 95 base::UTF16ToUTF8(ori->GetDatabaseDescription(*db)), | 95 base::UTF16ToUTF8(ori->GetDatabaseDescription(*db)), |
| 96 file_info.size, | 96 file_info.size, |
| 97 file_info.last_modified)); | 97 file_info.last_modified)); |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 } | 100 } |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 0, | 211 0, |
| 212 base::Time())); | 212 base::Time())); |
| 213 } | 213 } |
| 214 | 214 |
| 215 BrowserThread::PostTask( | 215 BrowserThread::PostTask( |
| 216 BrowserThread::UI, FROM_HERE, | 216 BrowserThread::UI, FROM_HERE, |
| 217 base::Bind(&CannedBrowsingDataDatabaseHelper::NotifyInUIThread, this)); | 217 base::Bind(&CannedBrowsingDataDatabaseHelper::NotifyInUIThread, this)); |
| 218 } | 218 } |
| 219 | 219 |
| 220 CannedBrowsingDataDatabaseHelper::~CannedBrowsingDataDatabaseHelper() {} | 220 CannedBrowsingDataDatabaseHelper::~CannedBrowsingDataDatabaseHelper() {} |
| OLD | NEW |