| 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 // Only print one of the private keys because l10n_util doesn't have a way | 277 // Only print one of the private keys because l10n_util doesn't have a way |
| 278 // to translate a list of strings. | 278 // to translate a list of strings. |
| 279 *error = l10n_util::GetStringFUTF8( | 279 *error = l10n_util::GetStringFUTF8( |
| 280 IDS_EXTENSION_CONTAINS_PRIVATE_KEY, | 280 IDS_EXTENSION_CONTAINS_PRIVATE_KEY, |
| 281 private_keys.front().LossyDisplayName()); | 281 private_keys.front().LossyDisplayName()); |
| 282 return false; | 282 return false; |
| 283 } | 283 } |
| 284 } else { | 284 } else { |
| 285 for (size_t i = 0; i < private_keys.size(); ++i) { | 285 for (size_t i = 0; i < private_keys.size(); ++i) { |
| 286 warnings->push_back(extensions::InstallWarning( | 286 warnings->push_back(extensions::InstallWarning( |
| 287 extensions::InstallWarning::FORMAT_TEXT, | |
| 288 l10n_util::GetStringFUTF8( | 287 l10n_util::GetStringFUTF8( |
| 289 IDS_EXTENSION_CONTAINS_PRIVATE_KEY, | 288 IDS_EXTENSION_CONTAINS_PRIVATE_KEY, |
| 290 private_keys[i].LossyDisplayName()))); | 289 private_keys[i].LossyDisplayName()))); |
| 291 } | 290 } |
| 292 // Only warn; don't block loading the extension. | 291 // Only warn; don't block loading the extension. |
| 293 } | 292 } |
| 294 return true; | 293 return true; |
| 295 } | 294 } |
| 296 | 295 |
| 297 std::set<base::FilePath> GetBrowserImagePaths(const Extension* extension) { | 296 std::set<base::FilePath> GetBrowserImagePaths(const Extension* extension) { |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 return base::FilePath(); | 565 return base::FilePath(); |
| 567 } | 566 } |
| 568 return temp_path; | 567 return temp_path; |
| 569 } | 568 } |
| 570 | 569 |
| 571 void DeleteFile(const base::FilePath& path, bool recursive) { | 570 void DeleteFile(const base::FilePath& path, bool recursive) { |
| 572 base::DeleteFile(path, recursive); | 571 base::DeleteFile(path, recursive); |
| 573 } | 572 } |
| 574 | 573 |
| 575 } // namespace extension_file_util | 574 } // namespace extension_file_util |
| OLD | NEW |