Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(929)

Side by Side Diff: chrome/browser/chromeos/display/quirks_client_delegate_impl.cc

Issue 1528963002: Quirks Client for downloading and providing display profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor manager and delegate Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698