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

Side by Side Diff: chrome/common/extensions/extension_file_util.cc

Issue 102873002: Move GetFileSize, NormalizeFilePath to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/common/extensions/extension_file_util.h" 5 #include "chrome/common/extensions/extension_file_util.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 221 }
222 222
223 result.push_back(current); 223 result.push_back(current);
224 } 224 }
225 return result; 225 return result;
226 } 226 }
227 227
228 bool ValidateFilePath(const base::FilePath& path) { 228 bool ValidateFilePath(const base::FilePath& path) {
229 int64 size = 0; 229 int64 size = 0;
230 if (!base::PathExists(path) || 230 if (!base::PathExists(path) ||
231 !file_util::GetFileSize(path, &size) || 231 !base::GetFileSize(path, &size) ||
232 size == 0) { 232 size == 0) {
233 return false; 233 return false;
234 } 234 }
235 235
236 return true; 236 return true;
237 } 237 }
238 238
239 bool ValidateExtensionIconSet(const ExtensionIconSet& icon_set, 239 bool ValidateExtensionIconSet(const ExtensionIconSet& icon_set,
240 const Extension* extension, 240 const Extension* extension,
241 int error_message_id, 241 int error_message_id,
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 return base::FilePath(); 522 return base::FilePath();
523 } 523 }
524 return temp_path; 524 return temp_path;
525 } 525 }
526 526
527 void DeleteFile(const base::FilePath& path, bool recursive) { 527 void DeleteFile(const base::FilePath& path, bool recursive) {
528 base::DeleteFile(path, recursive); 528 base::DeleteFile(path, recursive);
529 } 529 }
530 530
531 } // namespace extension_file_util 531 } // namespace extension_file_util
OLDNEW
« no previous file with comments | « chrome/browser/ui/network_profile_bubble.cc ('k') | chrome/installer/tools/validate_installation_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698