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

Unified Diff: components/policy/core/common/schema_map_unittest.cc

Issue 1348903007: Revert of Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/schema_map_unittest.cc
diff --git a/components/policy/core/common/schema_map_unittest.cc b/components/policy/core/common/schema_map_unittest.cc
index e19a70d383f5f63b9e0b507f71636fa17ede258b..ef7e336c9b6f810b5f73b2683a91c5246e7dab25 100644
--- a/components/policy/core/common/schema_map_unittest.cc
+++ b/components/policy/core/common/schema_map_unittest.cc
@@ -10,7 +10,6 @@
#include "components/policy/core/common/external_data_manager.h"
#include "components/policy/core/common/policy_bundle.h"
#include "components/policy/core/common/policy_map.h"
-#include "components/policy/core/common/policy_types.h"
#include "components/policy/core/common/schema.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -142,7 +141,6 @@
expected_bundle.Get(chrome_ns).Set("ChromePolicy",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::StringValue("value"),
NULL);
bundle.CopyFrom(expected_bundle);
@@ -152,7 +150,6 @@
bundle.Get(another_extension_ns).Set("AnotherExtensionPolicy",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::StringValue("value"),
NULL);
schema_map->FilterBundle(&bundle);
@@ -164,37 +161,32 @@
list.AppendString("a");
list.AppendString("b");
map.Set("list", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD, list.DeepCopy(), nullptr);
+ list.DeepCopy(), NULL);
map.Set("boolean",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(true),
NULL);
map.Set("integer",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(1),
NULL);
map.Set("null", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD, base::Value::CreateNullValue().release(),
- nullptr);
+ base::Value::CreateNullValue().release(), NULL);
map.Set("double",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(1.2),
NULL);
base::DictionaryValue dict;
dict.SetString("a", "b");
dict.SetInteger("b", 2);
map.Set("object", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD, dict.DeepCopy(), nullptr);
+ dict.DeepCopy(), NULL);
map.Set("string",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::StringValue("value"),
NULL);
@@ -202,7 +194,6 @@
bundle.Get(extension_ns).Set("Unexpected",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::StringValue("to-be-removed"),
NULL);
@@ -215,41 +206,35 @@
badmap.Set("list",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(false),
NULL);
badmap.Set("boolean",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(0),
NULL);
badmap.Set("integer",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(false),
NULL);
badmap.Set("null",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(false),
NULL);
badmap.Set("double",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(false),
NULL);
badmap.Set("object",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(false),
NULL);
badmap.Set("string", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD, nullptr,
+ NULL,
new ExternalDataFetcher(base::WeakPtr<ExternalDataManager>(),
std::string()));
@@ -281,7 +266,6 @@
bundle.Get(extension_ns).Set("String",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::StringValue("value 1"),
NULL);
@@ -290,7 +274,6 @@
bundle.Get(chrome_ns).Set("ChromePolicy",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::StringValue("value 3"),
NULL);
@@ -302,7 +285,6 @@
bundle.Get(without_schema_ns).Set("Schemaless",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::StringValue("value 2"),
NULL);
@@ -310,7 +292,6 @@
bundle.Get(extension_ns).Set("Surprise",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::StringValue("value 4"),
NULL);
@@ -319,7 +300,6 @@
bundle.Get(unknown_ns).Set("Surprise",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::StringValue("value 5"),
NULL);

Powered by Google App Engine
This is Rietveld 408576698