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

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

Issue 441008: Many changes to DictionaryValues:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/browser/extensions/extension_file_util.h" 5 #include "chrome/browser/extensions/extension_file_util.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 } 163 }
164 164
165 // Theme resource validation. 165 // Theme resource validation.
166 if (extension->IsTheme()) { 166 if (extension->IsTheme()) {
167 DictionaryValue* images_value = extension->GetThemeImages(); 167 DictionaryValue* images_value = extension->GetThemeImages();
168 if (images_value) { 168 if (images_value) {
169 for (DictionaryValue::key_iterator iter = images_value->begin_keys(); 169 for (DictionaryValue::key_iterator iter = images_value->begin_keys();
170 iter != images_value->end_keys(); ++iter) { 170 iter != images_value->end_keys(); ++iter) {
171 std::string val; 171 std::string val;
172 if (images_value->GetString(*iter, &val)) { 172 if (images_value->GetStringWithoutPathExpansion(*iter, &val)) {
173 FilePath image_path = extension->path().AppendASCII(val); 173 FilePath image_path = extension->path().AppendASCII(val);
174 if (!file_util::PathExists(image_path)) { 174 if (!file_util::PathExists(image_path)) {
175 *error = StringPrintf( 175 *error = StringPrintf(
176 "Could not load '%s' for theme.", 176 "Could not load '%s' for theme.",
177 WideToUTF8(image_path.ToWStringHack()).c_str()); 177 WideToUTF8(image_path.ToWStringHack()).c_str());
178 return false; 178 return false;
179 } 179 }
180 } 180 }
181 } 181 }
182 } 182 }
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 "Filenames starting with \"_\" are reserved for use by the system.", 487 "Filenames starting with \"_\" are reserved for use by the system.",
488 filename.c_str()); 488 filename.c_str());
489 return false; 489 return false;
490 } 490 }
491 } 491 }
492 492
493 return true; 493 return true;
494 } 494 }
495 495
496 } // namespace extension_file_util 496 } // namespace extension_file_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698