| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/chromeos/display/quirks_manager_delegate_impl.h" |
| 6 |
| 7 #include "base/path_service.h" |
| 8 #include "base/sys_info.h" |
| 9 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 10 #include "chrome/common/chrome_paths.h" |
| 11 #include "chromeos/chromeos_paths.h" |
| 12 #include "google_apis/google_api_keys.h" |
| 13 |
| 14 namespace quirks { |
| 15 |
| 16 std::string QuirksManagerDelegateImpl::GetApiKey() const { |
| 17 return google_apis::GetAPIKey(); |
| 18 } |
| 19 |
| 20 base::FilePath QuirksManagerDelegateImpl::GetBuiltInDisplayProfileDirectory() |
| 21 const { |
| 22 base::FilePath path; |
| 23 DCHECK( |
| 24 PathService::Get(chromeos::DIR_DEVICE_COLOR_CALIBRATION_PROFILES, &path)); |
| 25 return path; |
| 26 } |
| 27 |
| 28 base::FilePath QuirksManagerDelegateImpl::GetDownloadDisplayProfileDirectory() |
| 29 const { |
| 30 base::FilePath directory; |
| 31 if (base::SysInfo::IsRunningOnChromeOS()) { |
| 32 PathService::Get(chromeos::DIR_DEVICE_DISPLAY_PROFILES, &directory); |
| 33 } else { |
| 34 PathService::Get(chrome::DIR_USER_DATA, &directory); |
| 35 directory = directory.Append("display_profiles"); |
| 36 } |
| 37 return directory; |
| 38 } |
| 39 |
| 40 int QuirksManagerDelegateImpl::GetDaysSinceOobe() const { |
| 41 return chromeos::StartupUtils::GetTimeSinceOobeFlagFileCreation().InDays(); |
| 42 } |
| 43 |
| 44 } // namespace quirks |
| OLD | NEW |