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

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

Issue 2721553004: Remove auto raw pointer deduction from non-linux specific code. (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « chrome/browser/chromeos/note_taking_helper.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/device_local_account_policy_service.h" 5 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 Mock::VerifyAndClearExpectations(&provider_observer_); 869 Mock::VerifyAndClearExpectations(&provider_observer_);
870 870
871 PolicyBundle expected_policy_bundle; 871 PolicyBundle expected_policy_bundle;
872 expected_policy_bundle.Get(PolicyNamespace( 872 expected_policy_bundle.Get(PolicyNamespace(
873 POLICY_DOMAIN_CHROME, std::string())).CopyFrom(expected_policy_map_); 873 POLICY_DOMAIN_CHROME, std::string())).CopyFrom(expected_policy_map_);
874 EXPECT_TRUE(expected_policy_bundle.Equals(provider_->policies())); 874 EXPECT_TRUE(expected_policy_bundle.Equals(provider_->policies()));
875 875
876 // Make sure the Dinosaur game is disabled by default. This ensures the 876 // Make sure the Dinosaur game is disabled by default. This ensures the
877 // default policies have been set in Public Sessions. 877 // default policies have been set in Public Sessions.
878 bool allow_dinosaur_game = true; 878 bool allow_dinosaur_game = true;
879 auto policy_value = 879 auto* policy_value =
880 provider_->policies() 880 provider_->policies()
881 .Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) 881 .Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
882 .GetValue(key::kAllowDinosaurEasterEgg); 882 .GetValue(key::kAllowDinosaurEasterEgg);
883 EXPECT_TRUE(policy_value && policy_value->GetAsBoolean(&allow_dinosaur_game)); 883 EXPECT_TRUE(policy_value && policy_value->GetAsBoolean(&allow_dinosaur_game));
884 EXPECT_FALSE(allow_dinosaur_game); 884 EXPECT_FALSE(allow_dinosaur_game);
885 885
886 // Policy change should be reported. 886 // Policy change should be reported.
887 EXPECT_CALL(provider_observer_, OnUpdatePolicy(provider_.get())) 887 EXPECT_CALL(provider_observer_, OnUpdatePolicy(provider_.get()))
888 .Times(AtLeast(1)); 888 .Times(AtLeast(1));
889 device_local_account_policy_.payload() 889 device_local_account_policy_.payload()
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 1031
1032 provider_ = DeviceLocalAccountPolicyProvider::Create( 1032 provider_ = DeviceLocalAccountPolicyProvider::Create(
1033 GenerateDeviceLocalAccountUserId(kAccount1, 1033 GenerateDeviceLocalAccountUserId(kAccount1,
1034 DeviceLocalAccount::TYPE_PUBLIC_SESSION), 1034 DeviceLocalAccount::TYPE_PUBLIC_SESSION),
1035 service_.get(), true /*force_immediate_load*/); 1035 service_.get(), true /*force_immediate_load*/);
1036 1036
1037 EXPECT_TRUE(provider_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); 1037 EXPECT_TRUE(provider_->IsInitializationComplete(POLICY_DOMAIN_CHROME));
1038 } 1038 }
1039 1039
1040 } // namespace policy 1040 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/note_taking_helper.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698