| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 4273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4284 policy_value = 2 /* IP_ONLY */; | 4284 policy_value = 2 /* IP_ONLY */; |
| 4285 SetAndTestSystemTimezoneAutomaticDetectionPolicy(policy_value); | 4285 SetAndTestSystemTimezoneAutomaticDetectionPolicy(policy_value); |
| 4286 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, true)); | 4286 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, true)); |
| 4287 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4287 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
| 4288 | 4288 |
| 4289 policy_value = 3 /* SEND_WIFI_ACCESS_POINTS */; | 4289 policy_value = 3 /* SEND_WIFI_ACCESS_POINTS */; |
| 4290 SetAndTestSystemTimezoneAutomaticDetectionPolicy(policy_value); | 4290 SetAndTestSystemTimezoneAutomaticDetectionPolicy(policy_value); |
| 4291 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, true)); | 4291 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, true)); |
| 4292 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4292 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
| 4293 | 4293 |
| 4294 policy_value = 4 /* SEND_ALL_LOCATION_INFO */; |
| 4295 SetAndTestSystemTimezoneAutomaticDetectionPolicy(policy_value); |
| 4296 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, true)); |
| 4297 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
| 4298 |
| 4294 policy_value = 1 /* DISABLED */; | 4299 policy_value = 1 /* DISABLED */; |
| 4295 SetAndTestSystemTimezoneAutomaticDetectionPolicy(policy_value); | 4300 SetAndTestSystemTimezoneAutomaticDetectionPolicy(policy_value); |
| 4296 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(false, true)); | 4301 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(false, true)); |
| 4297 EXPECT_FALSE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4302 EXPECT_FALSE(manager->TimeZoneResolverShouldBeRunningForTests()); |
| 4298 | 4303 |
| 4299 SetEmptyPolicy(); | 4304 SetEmptyPolicy(); |
| 4300 // Policy not set. | 4305 // Policy not set. |
| 4301 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); | 4306 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); |
| 4302 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); | 4307 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); |
| 4303 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4308 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
| 4304 } | 4309 } |
| 4305 #endif // defined(OS_CHROMEOS) | 4310 #endif // defined(OS_CHROMEOS) |
| 4306 | 4311 |
| 4307 } // namespace policy | 4312 } // namespace policy |
| OLD | NEW |