OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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::api_key_quirks() { | |
17 return google_apis::GetAPIKey(); | |
18 } | |
19 | |
20 // Returns the path to the writable display profile directory. | |
stevenjb
2016/01/28 21:05:58
This comment should be in the header.
Greg Levin
2016/02/01 23:17:43
Done.
| |
21 // On chrome device, returns /var/cache/display_profiles. | |
22 // On Linux desktop, returns {DIR_USER_DATA}/display_profiles. | |
23 // Either directory must be created beforehand. | |
stevenjb
2016/01/28 21:05:58
s/must be created beforehand/must already exist/
Greg Levin
2016/02/01 23:17:43
Done.
| |
24 base::FilePath QuirksClientDelegateImpl::GetDisplayProfileDirectory() { | |
25 base::FilePath directory; | |
26 if (base::SysInfo::IsRunningOnChromeOS()) { | |
27 PathService::Get(chromeos::DIR_DEVICE_DISPLAY_PROFILES, &directory); | |
28 } else { | |
29 PathService::Get(chrome::DIR_USER_DATA, &directory); | |
30 directory = directory.Append("display_profiles"); | |
31 } | |
32 return directory; | |
33 } | |
34 | |
35 int QuirksClientDelegateImpl::GetDaysSinceOobe() { | |
36 return chromeos::StartupUtils::GetTimeSinceOobeFlagFileCreation().InDays(); | |
37 } | |
38 | |
39 } // namespace quirks_client | |
OLD | NEW |