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_client_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_client { |
| 15 |
| 16 std::string QuirksClientDelegateImpl::GetApiKey() const { |
| 17 return google_apis::GetAPIKey(); |
| 18 } |
| 19 |
| 20 base::FilePath QuirksClientDelegateImpl::GetDisplayProfileDirectory() const { |
| 21 base::FilePath directory; |
| 22 if (base::SysInfo::IsRunningOnChromeOS()) { |
| 23 PathService::Get(chromeos::DIR_DEVICE_DISPLAY_PROFILES, &directory); |
| 24 } else { |
| 25 PathService::Get(chrome::DIR_USER_DATA, &directory); |
| 26 directory = directory.Append("display_profiles"); |
| 27 } |
| 28 return directory; |
| 29 } |
| 30 |
| 31 int QuirksClientDelegateImpl::GetDaysSinceOobe() const { |
| 32 return chromeos::StartupUtils::GetTimeSinceOobeFlagFileCreation().InDays(); |
| 33 } |
| 34 |
| 35 } // namespace quirks_client |
OLD | NEW |