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

Side by Side Diff: chrome/browser/browsing_data_local_storage_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_local_storage_helper.h" 5 #include "chrome/browser/browsing_data_local_storage_helper.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 file_path = file_enumerator.Next()) { 69 file_path = file_enumerator.Next()) {
70 if (file_path.Extension() == DOMStorageContext::kLocalStorageExtension) { 70 if (file_path.Extension() == DOMStorageContext::kLocalStorageExtension) {
71 WebKit::WebSecurityOrigin web_security_origin = 71 WebKit::WebSecurityOrigin web_security_origin =
72 WebKit::WebSecurityOrigin::createFromDatabaseIdentifier( 72 WebKit::WebSecurityOrigin::createFromDatabaseIdentifier(
73 webkit_glue::FilePathToWebString(file_path.BaseName())); 73 webkit_glue::FilePathToWebString(file_path.BaseName()));
74 if (EqualsASCII(web_security_origin.protocol(), 74 if (EqualsASCII(web_security_origin.protocol(),
75 chrome::kExtensionScheme)) { 75 chrome::kExtensionScheme)) {
76 // Extension state is not considered browsing data. 76 // Extension state is not considered browsing data.
77 continue; 77 continue;
78 } 78 }
79 file_util::FileInfo file_info; 79 base::PlatformFileInfo file_info;
80 bool ret = file_util::GetFileInfo(file_path, &file_info); 80 bool ret = file_util::GetFileInfo(file_path, &file_info);
81 if (ret) { 81 if (ret) {
82 local_storage_info_.push_back(LocalStorageInfo( 82 local_storage_info_.push_back(LocalStorageInfo(
83 web_security_origin.protocol().utf8(), 83 web_security_origin.protocol().utf8(),
84 web_security_origin.host().utf8(), 84 web_security_origin.host().utf8(),
85 web_security_origin.port(), 85 web_security_origin.port(),
86 web_security_origin.databaseIdentifier().utf8(), 86 web_security_origin.databaseIdentifier().utf8(),
87 web_security_origin.toString().utf8(), 87 web_security_origin.toString().utf8(),
88 file_path, 88 file_path,
89 file_info.size, 89 file_info.size,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 bool CannedBrowsingDataLocalStorageHelper::empty() const { 155 bool CannedBrowsingDataLocalStorageHelper::empty() const {
156 return local_storage_info_.empty(); 156 return local_storage_info_.empty();
157 } 157 }
158 158
159 void CannedBrowsingDataLocalStorageHelper::StartFetching( 159 void CannedBrowsingDataLocalStorageHelper::StartFetching(
160 Callback1<const std::vector<LocalStorageInfo>& >::Type* callback) { 160 Callback1<const std::vector<LocalStorageInfo>& >::Type* callback) {
161 callback->Run(local_storage_info_); 161 callback->Run(local_storage_info_);
162 delete callback; 162 delete callback;
163 } 163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698