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 <memory> | 5 #include <memory> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ptr_util.h" |
14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
15 #include "base/path_service.h" | 16 #include "base/path_service.h" |
16 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
17 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
18 #include "base/synchronization/lock.h" | 19 #include "base/synchronization/lock.h" |
19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
20 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 21 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
21 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 22 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
22 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" | 23 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" |
23 #include "chrome/browser/net/net_error_diagnostics_dialog.h" | 24 #include "chrome/browser/net/net_error_diagnostics_dialog.h" |
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 | 1281 |
1281 policy::PolicyMap policy_map; | 1282 policy::PolicyMap policy_map; |
1282 #if defined(OS_CHROMEOS) | 1283 #if defined(OS_CHROMEOS) |
1283 if (enroll_) | 1284 if (enroll_) |
1284 SetEnterpriseUsersDefaults(&policy_map); | 1285 SetEnterpriseUsersDefaults(&policy_map); |
1285 #endif | 1286 #endif |
1286 if (set_allow_dinosaur_easter_egg_) { | 1287 if (set_allow_dinosaur_easter_egg_) { |
1287 policy_map.Set( | 1288 policy_map.Set( |
1288 policy::key::kAllowDinosaurEasterEgg, policy::POLICY_LEVEL_MANDATORY, | 1289 policy::key::kAllowDinosaurEasterEgg, policy::POLICY_LEVEL_MANDATORY, |
1289 policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, | 1290 policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, |
1290 new base::FundamentalValue(value_of_allow_dinosaur_easter_egg_), | 1291 base::WrapUnique( |
| 1292 new base::FundamentalValue(value_of_allow_dinosaur_easter_egg_)), |
1291 nullptr); | 1293 nullptr); |
1292 } | 1294 } |
1293 policy_provider_.UpdateChromePolicy(policy_map); | 1295 policy_provider_.UpdateChromePolicy(policy_map); |
1294 | 1296 |
1295 #if defined(OS_CHROMEOS) | 1297 #if defined(OS_CHROMEOS) |
1296 policy::BrowserPolicyConnector::SetPolicyProviderForTesting( | 1298 policy::BrowserPolicyConnector::SetPolicyProviderForTesting( |
1297 &policy_provider_); | 1299 &policy_provider_); |
1298 #else | 1300 #else |
1299 policy::ProfilePolicyConnectorFactory::GetInstance() | 1301 policy::ProfilePolicyConnectorFactory::GetInstance() |
1300 ->PushProviderForTesting(&policy_provider_); | 1302 ->PushProviderForTesting(&policy_provider_); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 IN_PROC_BROWSER_TEST_F(ErrorPageForIDNTest, IDN) { | 1459 IN_PROC_BROWSER_TEST_F(ErrorPageForIDNTest, IDN) { |
1458 // ERR_UNSAFE_PORT will not trigger navigation corrections. | 1460 // ERR_UNSAFE_PORT will not trigger navigation corrections. |
1459 ui_test_utils::NavigateToURL( | 1461 ui_test_utils::NavigateToURL( |
1460 browser(), | 1462 browser(), |
1461 URLRequestFailedJob::GetMockHttpUrlForHostname(net::ERR_UNSAFE_PORT, | 1463 URLRequestFailedJob::GetMockHttpUrlForHostname(net::ERR_UNSAFE_PORT, |
1462 kHostname)); | 1464 kHostname)); |
1463 EXPECT_TRUE(IsDisplayingText(browser(), kHostnameJSUnicode)); | 1465 EXPECT_TRUE(IsDisplayingText(browser(), kHostnameJSUnicode)); |
1464 } | 1466 } |
1465 | 1467 |
1466 } // namespace | 1468 } // namespace |
OLD | NEW |