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

Side by Side Diff: chrome/common/extensions/manifest_handlers/icons_handler.cc

Issue 93793010: Update uses of UTF conversions in chrome/common to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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) 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/manifest_handlers/icons_handler.h" 5 #include "chrome/common/extensions/manifest_handlers/icons_handler.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 IconsHandler::IconsHandler() { 70 IconsHandler::IconsHandler() {
71 } 71 }
72 72
73 IconsHandler::~IconsHandler() { 73 IconsHandler::~IconsHandler() {
74 } 74 }
75 75
76 bool IconsHandler::Parse(Extension* extension, base::string16* error) { 76 bool IconsHandler::Parse(Extension* extension, base::string16* error) {
77 scoped_ptr<IconsInfo> icons_info(new IconsInfo); 77 scoped_ptr<IconsInfo> icons_info(new IconsInfo);
78 const base::DictionaryValue* icons_dict = NULL; 78 const base::DictionaryValue* icons_dict = NULL;
79 if (!extension->manifest()->GetDictionary(keys::kIcons, &icons_dict)) { 79 if (!extension->manifest()->GetDictionary(keys::kIcons, &icons_dict)) {
80 *error = ASCIIToUTF16(manifest_errors::kInvalidIcons); 80 *error = base::ASCIIToUTF16(manifest_errors::kInvalidIcons);
81 return false; 81 return false;
82 } 82 }
83 83
84 if (!manifest_handler_helpers::LoadIconsFromDictionary( 84 if (!manifest_handler_helpers::LoadIconsFromDictionary(
85 icons_dict, 85 icons_dict,
86 extension_misc::kExtensionIconSizes, 86 extension_misc::kExtensionIconSizes,
87 extension_misc::kNumExtensionIconSizes, 87 extension_misc::kNumExtensionIconSizes,
88 &icons_info->icons, 88 &icons_info->icons,
89 error)) { 89 error)) {
90 return false; 90 return false;
(...skipping 11 matching lines...) Expand all
102 extension, 102 extension,
103 IDS_EXTENSION_LOAD_ICON_FAILED, 103 IDS_EXTENSION_LOAD_ICON_FAILED,
104 error); 104 error);
105 } 105 }
106 106
107 const std::vector<std::string> IconsHandler::Keys() const { 107 const std::vector<std::string> IconsHandler::Keys() const {
108 return SingleKey(keys::kIcons); 108 return SingleKey(keys::kIcons);
109 } 109 }
110 110
111 } // namespace extensions 111 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698