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

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

Issue 10945026: Fix crash in Extension::GetBrowserImages() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after
3236 DictionaryValue* theme_images = GetThemeImages(); 3236 DictionaryValue* theme_images = GetThemeImages();
3237 if (theme_images) { 3237 if (theme_images) {
3238 for (DictionaryValue::key_iterator it = theme_images->begin_keys(); 3238 for (DictionaryValue::key_iterator it = theme_images->begin_keys();
3239 it != theme_images->end_keys(); ++it) { 3239 it != theme_images->end_keys(); ++it) {
3240 std::string val; 3240 std::string val;
3241 if (theme_images->GetStringWithoutPathExpansion(*it, &val)) 3241 if (theme_images->GetStringWithoutPathExpansion(*it, &val))
3242 image_paths.insert(FilePath::FromWStringHack(UTF8ToWide(val))); 3242 image_paths.insert(FilePath::FromWStringHack(UTF8ToWide(val)));
3243 } 3243 }
3244 } 3244 }
3245 3245
3246 if (page_action()) { 3246 if (page_action() && page_action()->default_icon()) {
3247 for (ExtensionIconSet::IconMap::const_iterator iter = 3247 for (ExtensionIconSet::IconMap::const_iterator iter =
3248 page_action()->default_icon()->map().begin(); 3248 page_action()->default_icon()->map().begin();
3249 iter != page_action()->default_icon()->map().end(); 3249 iter != page_action()->default_icon()->map().end();
3250 ++iter) { 3250 ++iter) {
3251 image_paths.insert(FilePath::FromWStringHack(UTF8ToWide(iter->second))); 3251 image_paths.insert(FilePath::FromWStringHack(UTF8ToWide(iter->second)));
3252 } 3252 }
3253 } 3253 }
3254 3254
3255 if (browser_action()) { 3255 if (browser_action() && browser_action()->default_icon()) {
3256 for (ExtensionIconSet::IconMap::const_iterator iter = 3256 for (ExtensionIconSet::IconMap::const_iterator iter =
3257 browser_action()->default_icon()->map().begin(); 3257 browser_action()->default_icon()->map().begin();
3258 iter != browser_action()->default_icon()->map().end(); 3258 iter != browser_action()->default_icon()->map().end();
3259 ++iter) { 3259 ++iter) {
3260 image_paths.insert(FilePath::FromWStringHack(UTF8ToWide(iter->second))); 3260 image_paths.insert(FilePath::FromWStringHack(UTF8ToWide(iter->second)));
3261 } 3261 }
3262 } 3262 }
3263 3263
3264 return image_paths; 3264 return image_paths;
3265 } 3265 }
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
4021 4021
4022 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 4022 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
4023 const Extension* extension, 4023 const Extension* extension,
4024 const PermissionSet* permissions, 4024 const PermissionSet* permissions,
4025 Reason reason) 4025 Reason reason)
4026 : reason(reason), 4026 : reason(reason),
4027 extension(extension), 4027 extension(extension),
4028 permissions(permissions) {} 4028 permissions(permissions) {}
4029 4029
4030 } // namespace extensions 4030 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698