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

Side by Side Diff: components/signin/core/browser/test_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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "components/signin/core/browser/test_signin_client.h" 6 #include "components/signin/core/browser/test_signin_client.h"
7 #include "components/signin/core/browser/webdata/token_service_table.h" 7 #include "components/signin/core/browser/webdata/token_service_table.h"
8 #include "components/webdata/common/web_data_service_base.h" 8 #include "components/webdata/common/web_data_service_base.h"
9 #include "components/webdata/common/web_database_service.h" 9 #include "components/webdata/common/web_database_service.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 return std::string(); 45 return std::string();
46 } 46 }
47 47
48 void TestSigninClient::ClearSigninScopedDeviceId() { 48 void TestSigninClient::ClearSigninScopedDeviceId() {
49 } 49 }
50 50
51 net::URLRequestContextGetter* TestSigninClient::GetURLRequestContext() { 51 net::URLRequestContextGetter* TestSigninClient::GetURLRequestContext() {
52 return request_context_; 52 return request_context_;
53 } 53 }
54 54
55 void TestSigninClient::SetURLRequestContext(
56 net::URLRequestContextGetter* request_context) {
57 request_context_ = request_context;
58 }
59
55 std::string TestSigninClient::GetProductVersion() { return ""; } 60 std::string TestSigninClient::GetProductVersion() { return ""; }
56 61
57 void TestSigninClient::LoadDatabase() { 62 void TestSigninClient::LoadDatabase() {
58 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 63 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
59 base::FilePath path = temp_dir_.path().AppendASCII("TestWebDB"); 64 base::FilePath path = temp_dir_.path().AppendASCII("TestWebDB");
60 scoped_refptr<WebDatabaseService> web_database = 65 scoped_refptr<WebDatabaseService> web_database =
61 new WebDatabaseService(path, 66 new WebDatabaseService(path,
62 base::MessageLoopProxy::current(), 67 base::MessageLoopProxy::current(),
63 base::MessageLoopProxy::current()); 68 base::MessageLoopProxy::current());
64 web_database->AddTable(scoped_ptr<WebDatabaseTable>(new TokenServiceTable())); 69 web_database->AddTable(scoped_ptr<WebDatabaseTable>(new TokenServiceTable()));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 signin_host_id_ = kInvalidProcessId; 111 signin_host_id_ = kInvalidProcessId;
107 } 112 }
108 113
109 bool TestSigninClient::IsSigninProcess(int process_id) const { 114 bool TestSigninClient::IsSigninProcess(int process_id) const {
110 return process_id == signin_host_id_; 115 return process_id == signin_host_id_;
111 } 116 }
112 117
113 bool TestSigninClient::HasSigninProcess() const { 118 bool TestSigninClient::HasSigninProcess() const {
114 return signin_host_id_ != kInvalidProcessId; 119 return signin_host_id_ != kInvalidProcessId;
115 } 120 }
121
122 bool TestSigninClient::IsFirstRun() const {
123 return false;
124 }
125
126 base::Time TestSigninClient::GetInstallDate() {
127 return base::Time::Now();
128 }
OLDNEW
« no previous file with comments | « components/signin/core/browser/test_signin_client.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698