OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_path.h" | 10 #include "base/file_path.h" |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 const Extension::PluginInfo& plugin = extension->plugins()[i]; | 333 const Extension::PluginInfo& plugin = extension->plugins()[i]; |
334 if (!file_util::PathExists(plugin.path)) { | 334 if (!file_util::PathExists(plugin.path)) { |
335 *error = | 335 *error = |
336 l10n_util::GetStringFUTF8( | 336 l10n_util::GetStringFUTF8( |
337 IDS_EXTENSION_LOAD_PLUGIN_PATH_FAILED, | 337 IDS_EXTENSION_LOAD_PLUGIN_PATH_FAILED, |
338 plugin.path.LossyDisplayName()); | 338 plugin.path.LossyDisplayName()); |
339 return false; | 339 return false; |
340 } | 340 } |
341 } | 341 } |
342 | 342 |
343 const extensions::ActionInfo* action = extension->page_action_info(); | 343 const extensions::ActionInfo* action = |
| 344 extensions::ActionInfo::GetPageActionInfo(extension); |
344 if (action && !action->default_icon.empty() && | 345 if (action && !action->default_icon.empty() && |
345 !ValidateExtensionIconSet(action->default_icon, extension, | 346 !ValidateExtensionIconSet(action->default_icon, extension, |
346 IDS_EXTENSION_LOAD_ICON_FOR_PAGE_ACTION_FAILED, error)) { | 347 IDS_EXTENSION_LOAD_ICON_FOR_PAGE_ACTION_FAILED, error)) { |
347 return false; | 348 return false; |
348 } | 349 } |
349 | 350 |
350 action = extensions::ActionInfo::GetBrowserActionInfo(extension); | 351 action = extensions::ActionInfo::GetBrowserActionInfo(extension); |
351 if (action && !action->default_icon.empty() && | 352 if (action && !action->default_icon.empty() && |
352 !ValidateExtensionIconSet(action->default_icon, extension, | 353 !ValidateExtensionIconSet(action->default_icon, extension, |
353 IDS_EXTENSION_LOAD_ICON_FOR_BROWSER_ACTION_FAILED, error)) { | 354 IDS_EXTENSION_LOAD_ICON_FOR_BROWSER_ACTION_FAILED, error)) { |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 return base::FilePath(); | 772 return base::FilePath(); |
772 } | 773 } |
773 return temp_path; | 774 return temp_path; |
774 } | 775 } |
775 | 776 |
776 void DeleteFile(const base::FilePath& path, bool recursive) { | 777 void DeleteFile(const base::FilePath& path, bool recursive) { |
777 file_util::Delete(path, recursive); | 778 file_util::Delete(path, recursive); |
778 } | 779 } |
779 | 780 |
780 } // namespace extension_file_util | 781 } // namespace extension_file_util |
OLD | NEW |