| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/chromeos/drive/drive_pref_names.h" | 10 #include "chrome/browser/chromeos/drive/drive_pref_names.h" |
| 11 #include "chrome/browser/download/download_dir_policy_handler.h" | 11 #include "chrome/browser/download/download_dir_policy_handler.h" |
| 12 #include "chrome/browser/download/download_prefs.h" | 12 #include "chrome/browser/download/download_prefs.h" |
| 13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 14 #include "components/policy/core/browser/configuration_policy_handler_parameters
.h" | 14 #include "components/policy/core/browser/configuration_policy_handler_parameters
.h" |
| 15 #include "components/policy/core/browser/configuration_policy_pref_store.h" | 15 #include "components/policy/core/browser/configuration_policy_pref_store.h" |
| 16 #include "components/policy/core/browser/configuration_policy_pref_store_test.h" | 16 #include "components/policy/core/browser/configuration_policy_pref_store_test.h" |
| 17 #include "components/policy/core/common/policy_details.h" | 17 #include "components/policy/core/common/policy_details.h" |
| 18 #include "components/policy/core/common/policy_map.h" | 18 #include "components/policy/core/common/policy_map.h" |
| 19 #include "components/policy/core/common/policy_types.h" | 19 #include "components/policy/core/common/policy_types.h" |
| 20 #include "policy/policy_constants.h" | 20 #include "policy/policy_constants.h" |
| 21 | 21 |
| 22 #if defined(OS_CHROMEOS) | 22 #if defined(OS_CHROMEOS) |
| 23 #include "chrome/browser/chromeos/drive/file_system_util.h" | 23 #include "chrome/browser/chromeos/drive/file_system_core_util.h" |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 const char* kUserIDHash = "deadbeef"; | 28 const char* kUserIDHash = "deadbeef"; |
| 29 | 29 |
| 30 #if defined(OS_CHROMEOS) | 30 #if defined(OS_CHROMEOS) |
| 31 const char* kDriveNamePolicyVariableName = "${google_drive}"; | 31 const char* kDriveNamePolicyVariableName = "${google_drive}"; |
| 32 const base::FilePath::CharType* kRootRelativeToDriveMount = | 32 const base::FilePath::CharType* kRootRelativeToDriveMount = |
| 33 FILE_PATH_LITERAL("root"); | 33 FILE_PATH_LITERAL("root"); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 EXPECT_FALSE(recommended_store_->GetValue(prefs::kPromptForDownload, NULL)); | 154 EXPECT_FALSE(recommended_store_->GetValue(prefs::kPromptForDownload, NULL)); |
| 155 EXPECT_FALSE(recommended_store_->GetValue(drive::prefs::kDisableDrive, NULL)); | 155 EXPECT_FALSE(recommended_store_->GetValue(drive::prefs::kDisableDrive, NULL)); |
| 156 | 156 |
| 157 EXPECT_TRUE( | 157 EXPECT_TRUE( |
| 158 recommended_store_->GetValue(prefs::kDownloadDefaultDirectory, &value)); | 158 recommended_store_->GetValue(prefs::kDownloadDefaultDirectory, &value)); |
| 159 EXPECT_TRUE(value); | 159 EXPECT_TRUE(value); |
| 160 EXPECT_TRUE(value->GetAsString(&download_directory)); | 160 EXPECT_TRUE(value->GetAsString(&download_directory)); |
| 161 EXPECT_EQ(kUserIDHash, download_directory); | 161 EXPECT_EQ(kUserIDHash, download_directory); |
| 162 } | 162 } |
| 163 #endif | 163 #endif |
| OLD | NEW |