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

Side by Side Diff: chrome/common/extensions/manifest_handlers/settings_overrides_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/settings_overrides_handler. h" 5 #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler. h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 if (!settings) 239 if (!settings)
240 return false; 240 return false;
241 241
242 scoped_ptr<SettingsOverrides> info(new SettingsOverrides); 242 scoped_ptr<SettingsOverrides> info(new SettingsOverrides);
243 info->bookmarks_ui.swap(settings->bookmarks_ui); 243 info->bookmarks_ui.swap(settings->bookmarks_ui);
244 info->homepage = ParseHomepage(*settings, error); 244 info->homepage = ParseHomepage(*settings, error);
245 info->search_engine = ParseSearchEngine(settings.get(), error); 245 info->search_engine = ParseSearchEngine(settings.get(), error);
246 info->startup_pages = ParseStartupPage(*settings, error); 246 info->startup_pages = ParseStartupPage(*settings, error);
247 if (!info->bookmarks_ui && !info->homepage && 247 if (!info->bookmarks_ui && !info->homepage &&
248 !info->search_engine && info->startup_pages.empty()) { 248 !info->search_engine && info->startup_pages.empty()) {
249 *error = ASCIIToUTF16(manifest_errors::kInvalidEmptySettingsOverrides); 249 *error =
250 base::ASCIIToUTF16(manifest_errors::kInvalidEmptySettingsOverrides);
250 return false; 251 return false;
251 } 252 }
252 info->manifest_permission.reset(new ManifestPermissionImpl( 253 info->manifest_permission.reset(new ManifestPermissionImpl(
253 info->RequiresHideBookmarkButtonPermission())); 254 info->RequiresHideBookmarkButtonPermission()));
254 255
255 APIPermissionSet* permission_set = 256 APIPermissionSet* permission_set =
256 PermissionsData::GetInitialAPIPermissions(extension); 257 PermissionsData::GetInitialAPIPermissions(extension);
257 DCHECK(permission_set); 258 DCHECK(permission_set);
258 if (info->search_engine) { 259 if (info->search_engine) {
259 permission_set->insert(new SettingsOverrideAPIPermission( 260 permission_set->insert(new SettingsOverrideAPIPermission(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 const SettingsOverrides* data = SettingsOverrides::Get(extension); 307 const SettingsOverrides* data = SettingsOverrides::Get(extension);
307 if (data) 308 if (data)
308 return data->manifest_permission->Clone(); 309 return data->manifest_permission->Clone();
309 return NULL; 310 return NULL;
310 } 311 }
311 const std::vector<std::string> SettingsOverridesHandler::Keys() const { 312 const std::vector<std::string> SettingsOverridesHandler::Keys() const {
312 return SingleKey(manifest_keys::kSettingsOverride); 313 return SingleKey(manifest_keys::kSettingsOverride);
313 } 314 }
314 315
315 } // namespace extensions 316 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698