| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |