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

Side by Side Diff: components/policy/core/common/registry_dict_win.cc

Issue 107383002: Use base namespace for string16 in components and cloud_print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 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 "components/policy/core/common/registry_dict_win.h" 5 #include "components/policy/core/common/registry_dict_win.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 entry != other.values_.end(); ++entry) { 288 entry != other.values_.end(); ++entry) {
289 SetValue(entry->first, make_scoped_ptr(entry->second->DeepCopy())); 289 SetValue(entry->first, make_scoped_ptr(entry->second->DeepCopy()));
290 } 290 }
291 } 291 }
292 292
293 void RegistryDict::Swap(RegistryDict* other) { 293 void RegistryDict::Swap(RegistryDict* other) {
294 keys_.swap(other->keys_); 294 keys_.swap(other->keys_);
295 values_.swap(other->values_); 295 values_.swap(other->values_);
296 } 296 }
297 297
298 void RegistryDict::ReadRegistry(HKEY hive, const string16& root) { 298 void RegistryDict::ReadRegistry(HKEY hive, const base::string16& root) {
299 ClearKeys(); 299 ClearKeys();
300 ClearValues(); 300 ClearValues();
301 301
302 // First, read all the values of the key. 302 // First, read all the values of the key.
303 for (RegistryValueIterator it(hive, root.c_str()); it.Valid(); ++it) { 303 for (RegistryValueIterator it(hive, root.c_str()); it.Valid(); ++it) {
304 const std::string name = UTF16ToUTF8(it.Name()); 304 const std::string name = UTF16ToUTF8(it.Name());
305 switch (it.Type()) { 305 switch (it.Type()) {
306 case REG_SZ: 306 case REG_SZ:
307 case REG_EXPAND_SZ: 307 case REG_EXPAND_SZ:
308 SetValue( 308 SetValue(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 return result.Pass(); 391 return result.Pass();
392 } 392 }
393 default: 393 default:
394 LOG(WARNING) << "Can't convert registry key to schema type " << type; 394 LOG(WARNING) << "Can't convert registry key to schema type " << type;
395 } 395 }
396 396
397 return make_scoped_ptr(base::Value::CreateNullValue()); 397 return make_scoped_ptr(base::Value::CreateNullValue());
398 } 398 }
399 399
400 } // namespace policy 400 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/registry_dict_win.h ('k') | components/sessions/serialized_navigation_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698