| OLD | NEW |
| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 base::MessageLoopProxy::current(), | 67 base::MessageLoopProxy::current(), |
| 68 base::MessageLoopProxy::current(), | 68 base::MessageLoopProxy::current(), |
| 69 WebDataServiceBase::ProfileErrorCallback()); | 69 WebDataServiceBase::ProfileErrorCallback()); |
| 70 database_->Init(); | 70 database_->Init(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool TestSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() { | 73 bool TestSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() { |
| 74 return true; | 74 return true; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void TestSigninClient::SetCookieChangedCallback( | 77 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription> |
| 78 const CookieChangedCallback& callback) {} | 78 TestSigninClient::AddCookieChangedCallback( |
| 79 const SigninClient::CookieChangedCallback& callback) { |
| 80 return cookie_callbacks_.Add(callback); |
| 81 } |
| 79 | 82 |
| 80 #if defined(OS_IOS) | 83 #if defined(OS_IOS) |
| 81 ios::ProfileOAuth2TokenServiceIOSProvider* TestSigninClient::GetIOSProvider() { | 84 ios::ProfileOAuth2TokenServiceIOSProvider* TestSigninClient::GetIOSProvider() { |
| 82 return GetIOSProviderAsFake(); | 85 return GetIOSProviderAsFake(); |
| 83 } | 86 } |
| 84 | 87 |
| 85 ios::FakeProfileOAuth2TokenServiceIOSProvider* | 88 ios::FakeProfileOAuth2TokenServiceIOSProvider* |
| 86 TestSigninClient::GetIOSProviderAsFake() { | 89 TestSigninClient::GetIOSProviderAsFake() { |
| 87 if (!iosProvider_) { | 90 if (!iosProvider_) { |
| 88 iosProvider_.reset(new ios::FakeProfileOAuth2TokenServiceIOSProvider()); | 91 iosProvider_.reset(new ios::FakeProfileOAuth2TokenServiceIOSProvider()); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 103 signin_host_id_ = kInvalidProcessId; | 106 signin_host_id_ = kInvalidProcessId; |
| 104 } | 107 } |
| 105 | 108 |
| 106 bool TestSigninClient::IsSigninProcess(int process_id) const { | 109 bool TestSigninClient::IsSigninProcess(int process_id) const { |
| 107 return process_id == signin_host_id_; | 110 return process_id == signin_host_id_; |
| 108 } | 111 } |
| 109 | 112 |
| 110 bool TestSigninClient::HasSigninProcess() const { | 113 bool TestSigninClient::HasSigninProcess() const { |
| 111 return signin_host_id_ != kInvalidProcessId; | 114 return signin_host_id_ != kInvalidProcessId; |
| 112 } | 115 } |
| OLD | NEW |