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

Unified 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: First round of review fixes, separate QCManager into separate file Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/display/quirks_client_delegate_impl.cc
diff --git a/chrome/browser/chromeos/display/quirks_client_delegate_impl.cc b/chrome/browser/chromeos/display/quirks_client_delegate_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ef08bbb94316d810b0f885fd13ffb96de940610d
--- /dev/null
+++ b/chrome/browser/chromeos/display/quirks_client_delegate_impl.cc
@@ -0,0 +1,35 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/display/quirks_client_delegate_impl.h"
+
+#include "base/path_service.h"
+#include "base/sys_info.h"
+#include "chrome/browser/chromeos/login/startup_utils.h"
+#include "chrome/common/chrome_paths.h"
+#include "chromeos/chromeos_paths.h"
+#include "google_apis/google_api_keys.h"
+
+namespace quirks_client {
+
+std::string QuirksClientDelegateImpl::GetApiKey() const {
+ return google_apis::GetAPIKey();
+}
+
+base::FilePath QuirksClientDelegateImpl::GetDisplayProfileDirectory() const {
+ base::FilePath directory;
+ if (base::SysInfo::IsRunningOnChromeOS()) {
+ PathService::Get(chromeos::DIR_DEVICE_DISPLAY_PROFILES, &directory);
+ } else {
+ PathService::Get(chrome::DIR_USER_DATA, &directory);
+ directory = directory.Append("display_profiles");
+ }
+ return directory;
+}
+
+int QuirksClientDelegateImpl::GetDaysSinceOobe() const {
+ return chromeos::StartupUtils::GetTimeSinceOobeFlagFileCreation().InDays();
+}
+
+} // namespace quirks_client

Powered by Google App Engine
This is Rietveld 408576698