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

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

Issue 12042096: Move page action manifest parsing out of Extension; the first multi-key manifest handler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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) 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 const Extension::PluginInfo& plugin = extension->plugins()[i]; 322 const Extension::PluginInfo& plugin = extension->plugins()[i];
323 if (!file_util::PathExists(plugin.path)) { 323 if (!file_util::PathExists(plugin.path)) {
324 *error = 324 *error =
325 l10n_util::GetStringFUTF8( 325 l10n_util::GetStringFUTF8(
326 IDS_EXTENSION_LOAD_PLUGIN_PATH_FAILED, 326 IDS_EXTENSION_LOAD_PLUGIN_PATH_FAILED,
327 plugin.path.LossyDisplayName()); 327 plugin.path.LossyDisplayName());
328 return false; 328 return false;
329 } 329 }
330 } 330 }
331 331
332 const extensions::ActionInfo* action = extension->page_action_info(); 332 const extensions::ActionInfo* action =
333 extensions::ActionInfo::GetPageActionInfo(extension);
333 if (action && !action->default_icon.empty() && 334 if (action && !action->default_icon.empty() &&
334 !ValidateExtensionIconSet(action->default_icon, extension, 335 !ValidateExtensionIconSet(action->default_icon, extension,
335 IDS_EXTENSION_LOAD_ICON_FOR_PAGE_ACTION_FAILED, error)) { 336 IDS_EXTENSION_LOAD_ICON_FOR_PAGE_ACTION_FAILED, error)) {
336 return false; 337 return false;
337 } 338 }
338 339
339 action = extension->browser_action_info(); 340 action = extension->browser_action_info();
340 if (action && !action->default_icon.empty() && 341 if (action && !action->default_icon.empty() &&
341 !ValidateExtensionIconSet(action->default_icon, extension, 342 !ValidateExtensionIconSet(action->default_icon, extension,
342 IDS_EXTENSION_LOAD_ICON_FOR_BROWSER_ACTION_FAILED, error)) { 343 IDS_EXTENSION_LOAD_ICON_FOR_BROWSER_ACTION_FAILED, error)) {
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 return FilePath(); 757 return FilePath();
757 } 758 }
758 return temp_path; 759 return temp_path;
759 } 760 }
760 761
761 void DeleteFile(const FilePath& path, bool recursive) { 762 void DeleteFile(const FilePath& path, bool recursive) {
762 file_util::Delete(path, recursive); 763 file_util::Delete(path, recursive);
763 } 764 }
764 765
765 } // namespace extension_file_util 766 } // namespace extension_file_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698