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

Unified Diff: chrome/browser/signin/chrome_signin_client.cc

Issue 466043002: Track when user signs in the profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android doesn't track first run within chrome c++ Created 6 years, 4 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
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.h ('k') | chrome/browser/signin/signin_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/chrome_signin_client.cc
diff --git a/chrome/browser/signin/chrome_signin_client.cc b/chrome/browser/signin/chrome_signin_client.cc
index 66f9326190850b68d8d65509611d974e942246e9..1d7449a496963d4bbcf5c29bf6b451402eb684bc 100644
--- a/chrome/browser/signin/chrome_signin_client.cc
+++ b/chrome/browser/signin/chrome_signin_client.cc
@@ -7,12 +7,14 @@
#include "base/command_line.h"
#include "base/guid.h"
#include "base/prefs/pref_service.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/content_settings/cookie_settings.h"
#include "chrome/browser/net/chrome_cookie_notification_details.h"
#include "chrome/browser/signin/local_auth.h"
#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/chrome_version_info.h"
+#include "components/metrics/metrics_service.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "components/signin/core/common/signin_pref_names.h"
#include "components/signin/core/common/signin_switches.h"
@@ -30,6 +32,10 @@
#include "components/user_manager/user_manager.h"
#endif
+#if !defined(OS_ANDROID)
+#include "chrome/browser/first_run/first_run.h"
+#endif
+
using content::ChildProcessHost;
using content::RenderProcessHost;
@@ -176,6 +182,19 @@ std::string ChromeSigninClient::GetProductVersion() {
return chrome_version.CreateVersionString();
}
+bool ChromeSigninClient::IsFirstRun() const {
+#if defined(OS_ANDROID)
+ return false;
+#else
+ return first_run::IsChromeFirstRun();
+#endif
+}
+
+base::Time ChromeSigninClient::GetInstallDate() {
+ return base::Time::FromTimeT(
+ g_browser_process->metrics_service()->GetInstallDate());
+}
+
scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription>
ChromeSigninClient::AddCookieChangedCallback(
const CookieChangedCallback& callback) {
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.h ('k') | chrome/browser/signin/signin_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698