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

Side by Side Diff: remoting/host/pairing_registry_delegate_win.cc

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 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
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 "remoting/host/pairing_registry_delegate_win.h" 5 #include "remoting/host/pairing_registry_delegate_win.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 int error_code; 56 int error_code;
57 std::string error_message; 57 std::string error_message;
58 std::unique_ptr<base::Value> value = 58 std::unique_ptr<base::Value> value =
59 deserializer.Deserialize(&error_code, &error_message); 59 deserializer.Deserialize(&error_code, &error_message);
60 if (!value) { 60 if (!value) {
61 LOG(ERROR) << "Failed to parse '" << value_name << "': " << error_message 61 LOG(ERROR) << "Failed to parse '" << value_name << "': " << error_message
62 << " (" << error_code << ")."; 62 << " (" << error_code << ").";
63 return nullptr; 63 return nullptr;
64 } 64 }
65 65
66 if (!value->IsType(base::Value::TYPE_DICTIONARY)) { 66 if (!value->IsType(base::Value::Type::DICTIONARY)) {
67 LOG(ERROR) << "Failed to parse '" << value_name << "': not a dictionary."; 67 LOG(ERROR) << "Failed to parse '" << value_name << "': not a dictionary.";
68 return nullptr; 68 return nullptr;
69 } 69 }
70 70
71 return base::WrapUnique(static_cast<base::DictionaryValue*>(value.release())); 71 return base::WrapUnique(static_cast<base::DictionaryValue*>(value.release()));
72 } 72 }
73 73
74 // Serializes |value| into a JSON string and writes it as value |value_name| 74 // Serializes |value| into a JSON string and writes it as value |value_name|
75 // under |key|. 75 // under |key|.
76 bool WriteValue(base::win::RegKey& key, 76 bool WriteValue(base::win::RegKey& key,
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 263 }
264 264
265 return true; 265 return true;
266 } 266 }
267 267
268 std::unique_ptr<PairingRegistry::Delegate> CreatePairingRegistryDelegate() { 268 std::unique_ptr<PairingRegistry::Delegate> CreatePairingRegistryDelegate() {
269 return base::MakeUnique<PairingRegistryDelegateWin>(); 269 return base::MakeUnique<PairingRegistryDelegateWin>();
270 } 270 }
271 271
272 } // namespace remoting 272 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/it2me/it2me_native_messaging_host_unittest.cc ('k') | remoting/host/policy_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698