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

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

Issue 3347005: Moving file_util::FileInfo to base::PlatformFileInfo, and adding the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/callback.h" 7 #include "base/callback.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 continue; 63 continue;
64 } 64 }
65 WebKit::WebSecurityOrigin web_security_origin = 65 WebKit::WebSecurityOrigin web_security_origin =
66 WebKit::WebSecurityOrigin::createFromDatabaseIdentifier( 66 WebKit::WebSecurityOrigin::createFromDatabaseIdentifier(
67 ori->GetOrigin()); 67 ori->GetOrigin());
68 std::vector<string16> databases; 68 std::vector<string16> databases;
69 ori->GetAllDatabaseNames(&databases); 69 ori->GetAllDatabaseNames(&databases);
70 for (std::vector<string16>::const_iterator db = databases.begin(); 70 for (std::vector<string16>::const_iterator db = databases.begin();
71 db != databases.end(); ++db) { 71 db != databases.end(); ++db) {
72 FilePath file_path = tracker_->GetFullDBFilePath(ori->GetOrigin(), *db); 72 FilePath file_path = tracker_->GetFullDBFilePath(ori->GetOrigin(), *db);
73 file_util::FileInfo file_info; 73 base::PlatformFileInfo file_info;
74 if (file_util::GetFileInfo(file_path, &file_info)) { 74 if (file_util::GetFileInfo(file_path, &file_info)) {
75 database_info_.push_back(DatabaseInfo( 75 database_info_.push_back(DatabaseInfo(
76 web_security_origin.host().utf8(), 76 web_security_origin.host().utf8(),
77 UTF16ToUTF8(*db), 77 UTF16ToUTF8(*db),
78 origin_identifier, 78 origin_identifier,
79 UTF16ToUTF8(ori->GetDatabaseDescription(*db)), 79 UTF16ToUTF8(ori->GetDatabaseDescription(*db)),
80 web_security_origin.toString().utf8(), 80 web_security_origin.toString().utf8(),
81 file_info.size, 81 file_info.size,
82 file_info.last_modified)); 82 file_info.last_modified));
83 } 83 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 bool CannedBrowsingDataDatabaseHelper::empty() const { 150 bool CannedBrowsingDataDatabaseHelper::empty() const {
151 return database_info_.empty(); 151 return database_info_.empty();
152 } 152 }
153 153
154 void CannedBrowsingDataDatabaseHelper::StartFetching( 154 void CannedBrowsingDataDatabaseHelper::StartFetching(
155 Callback1<const std::vector<DatabaseInfo>& >::Type* callback) { 155 Callback1<const std::vector<DatabaseInfo>& >::Type* callback) {
156 callback->Run(database_info_); 156 callback->Run(database_info_);
157 delete callback; 157 delete callback;
158 } 158 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698