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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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 "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 policy_map_.Set(key::kHomepageLocation, POLICY_LEVEL_MANDATORY, 116 policy_map_.Set(key::kHomepageLocation, POLICY_LEVEL_MANDATORY,
117 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, 117 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
118 base::MakeUnique<base::StringValue>("http://chromium.org"), 118 base::MakeUnique<base::StringValue>("http://chromium.org"),
119 nullptr); 119 nullptr);
120 policy_map_.Set( 120 policy_map_.Set(
121 key::kChromeOsMultiProfileUserBehavior, POLICY_LEVEL_MANDATORY, 121 key::kChromeOsMultiProfileUserBehavior, POLICY_LEVEL_MANDATORY,
122 POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT, 122 POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT,
123 base::MakeUnique<base::StringValue>("primary-only"), nullptr); 123 base::MakeUnique<base::StringValue>("primary-only"), nullptr);
124 policy_map_.Set(key::kEasyUnlockAllowed, POLICY_LEVEL_MANDATORY, 124 policy_map_.Set(key::kEasyUnlockAllowed, POLICY_LEVEL_MANDATORY,
125 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, 125 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
126 base::MakeUnique<base::FundamentalValue>(false), nullptr); 126 base::MakeUnique<base::Value>(false), nullptr);
127 policy_map_.Set(key::kCaptivePortalAuthenticationIgnoresProxy, 127 policy_map_.Set(key::kCaptivePortalAuthenticationIgnoresProxy,
128 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, 128 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
129 POLICY_SOURCE_CLOUD, 129 POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>(false),
130 base::MakeUnique<base::FundamentalValue>(false), nullptr); 130 nullptr);
131 policy_map_.Set(key::kAllowDinosaurEasterEgg, POLICY_LEVEL_MANDATORY, 131 policy_map_.Set(key::kAllowDinosaurEasterEgg, POLICY_LEVEL_MANDATORY,
132 POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT, 132 POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT,
133 base::MakeUnique<base::FundamentalValue>(false), nullptr); 133 base::MakeUnique<base::Value>(false), nullptr);
134 expected_bundle_.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) 134 expected_bundle_.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
135 .CopyFrom(policy_map_); 135 .CopyFrom(policy_map_);
136 136
137 // Create fake policy blobs to deliver to the client. 137 // Create fake policy blobs to deliver to the client.
138 em::DeviceRegisterResponse* register_response = 138 em::DeviceRegisterResponse* register_response =
139 register_blob_.mutable_register_response(); 139 register_blob_.mutable_register_response();
140 register_response->set_device_management_token("dmtoken123"); 140 register_response->set_device_management_token("dmtoken123");
141 141
142 em::CloudPolicySettings policy_proto; 142 em::CloudPolicySettings policy_proto;
143 policy_proto.mutable_homepagelocation()->set_value("http://chromium.org"); 143 policy_proto.mutable_homepagelocation()->set_value("http://chromium.org");
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); 591 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME));
592 EXPECT_TRUE(manager_->core()->client()->is_registered()); 592 EXPECT_TRUE(manager_->core()->client()->is_registered());
593 593
594 // The refresh scheduler takes care of the initial fetch for unmanaged users. 594 // The refresh scheduler takes care of the initial fetch for unmanaged users.
595 // Running the task runner issues the initial fetch. 595 // Running the task runner issues the initial fetch.
596 FetchPolicy( 596 FetchPolicy(
597 base::Bind(&base::TestSimpleTaskRunner::RunUntilIdle, task_runner_)); 597 base::Bind(&base::TestSimpleTaskRunner::RunUntilIdle, task_runner_));
598 } 598 }
599 599
600 } // namespace policy 600 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698