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

Side by Side Diff: components/policy/core/browser/configuration_policy_handler.cc

Issue 2151793002: Add base::Value::GetTypeName(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win build Created 4 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/configuration_policy_handler.h" 5 #include "components/policy/core/browser/configuration_policy_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 12 matching lines...) Expand all
23 #include "grit/components_strings.h" 23 #include "grit/components_strings.h"
24 #include "url/gurl.h" 24 #include "url/gurl.h"
25 25
26 namespace policy { 26 namespace policy {
27 27
28 // ConfigurationPolicyHandler implementation ----------------------------------- 28 // ConfigurationPolicyHandler implementation -----------------------------------
29 29
30 // static 30 // static
31 std::string ConfigurationPolicyHandler::ValueTypeToString( 31 std::string ConfigurationPolicyHandler::ValueTypeToString(
32 base::Value::Type type) { 32 base::Value::Type type) {
33 static const char* strings[] = { 33 return std::string(base::Value::GetTypeName(type));
34 "null",
35 "boolean",
36 "integer",
37 "double",
38 "string",
39 "binary",
40 "dictionary",
41 "list"
42 };
43 CHECK(static_cast<size_t>(type) < arraysize(strings));
44 return std::string(strings[type]);
45 } 34 }
46 35
47 ConfigurationPolicyHandler::ConfigurationPolicyHandler() { 36 ConfigurationPolicyHandler::ConfigurationPolicyHandler() {
48 } 37 }
49 38
50 ConfigurationPolicyHandler::~ConfigurationPolicyHandler() { 39 ConfigurationPolicyHandler::~ConfigurationPolicyHandler() {
51 } 40 }
52 41
53 void ConfigurationPolicyHandler::PrepareForDisplaying( 42 void ConfigurationPolicyHandler::PrepareForDisplaying(
54 PolicyMap* policies) const {} 43 PolicyMap* policies) const {}
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 } 475 }
487 } 476 }
488 } 477 }
489 void LegacyPoliciesDeprecatingPolicyHandler::ApplyPolicySettings( 478 void LegacyPoliciesDeprecatingPolicyHandler::ApplyPolicySettings(
490 const policy::PolicyMap& /* policies */, 479 const policy::PolicyMap& /* policies */,
491 PrefValueMap* /* prefs */) { 480 PrefValueMap* /* prefs */) {
492 NOTREACHED(); 481 NOTREACHED();
493 } 482 }
494 483
495 } // namespace policy 484 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698