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

Unified Diff: components/signin/core/browser/fake_profile_oauth2_token_service.cc

Issue 1245103005: Componentize more signin code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « components/signin/core/browser/fake_profile_oauth2_token_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/fake_profile_oauth2_token_service.cc
diff --git a/chrome/browser/signin/fake_profile_oauth2_token_service.cc b/components/signin/core/browser/fake_profile_oauth2_token_service.cc
similarity index 84%
rename from chrome/browser/signin/fake_profile_oauth2_token_service.cc
rename to components/signin/core/browser/fake_profile_oauth2_token_service.cc
index d86b5d346e144e2acff62521e4f00172dc1f3b27..5d699f892c9ed04dad5d33c751f12dd8fe9cd802 100644
--- a/chrome/browser/signin/fake_profile_oauth2_token_service.cc
+++ b/components/signin/core/browser/fake_profile_oauth2_token_service.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
+#include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
#include "base/bind.h"
#include "base/location.h"
@@ -10,11 +10,9 @@
#include "base/thread_task_runner_handle.h"
#include "google_apis/gaia/fake_oauth2_token_service_delegate.h"
-FakeProfileOAuth2TokenService::PendingRequest::PendingRequest() {
-}
+FakeProfileOAuth2TokenService::PendingRequest::PendingRequest() {}
-FakeProfileOAuth2TokenService::PendingRequest::~PendingRequest() {
-}
+FakeProfileOAuth2TokenService::PendingRequest::~PendingRequest() {}
FakeProfileOAuth2TokenService::FakeProfileOAuth2TokenService()
: FakeProfileOAuth2TokenService(
@@ -26,29 +24,21 @@ FakeProfileOAuth2TokenService::FakeProfileOAuth2TokenService(
auto_post_fetch_response_on_message_loop_(false),
weak_ptr_factory_(this) {}
-FakeProfileOAuth2TokenService::~FakeProfileOAuth2TokenService() {
-}
+FakeProfileOAuth2TokenService::~FakeProfileOAuth2TokenService() {}
void FakeProfileOAuth2TokenService::IssueAllTokensForAccount(
const std::string& account_id,
const std::string& access_token,
const base::Time& expiration) {
- CompleteRequests(account_id,
- true,
- ScopeSet(),
- GoogleServiceAuthError::AuthErrorNone(),
- access_token,
+ CompleteRequests(account_id, true, ScopeSet(),
+ GoogleServiceAuthError::AuthErrorNone(), access_token,
expiration);
}
void FakeProfileOAuth2TokenService::IssueErrorForAllPendingRequestsForAccount(
const std::string& account_id,
const GoogleServiceAuthError& error) {
- CompleteRequests(account_id,
- true,
- ScopeSet(),
- error,
- std::string(),
+ CompleteRequests(account_id, true, ScopeSet(), error, std::string(),
base::Time());
}
@@ -56,12 +46,8 @@ void FakeProfileOAuth2TokenService::IssueTokenForScope(
const ScopeSet& scope,
const std::string& access_token,
const base::Time& expiration) {
- CompleteRequests("",
- false,
- scope,
- GoogleServiceAuthError::AuthErrorNone(),
- access_token,
- expiration);
+ CompleteRequests("", false, scope, GoogleServiceAuthError::AuthErrorNone(),
+ access_token, expiration);
}
void FakeProfileOAuth2TokenService::IssueErrorForScope(
@@ -78,11 +64,8 @@ void FakeProfileOAuth2TokenService::IssueErrorForAllPendingRequests(
void FakeProfileOAuth2TokenService::IssueTokenForAllPendingRequests(
const std::string& access_token,
const base::Time& expiration) {
- CompleteRequests("",
- true,
- ScopeSet(),
- GoogleServiceAuthError::AuthErrorNone(),
- access_token,
+ CompleteRequests("", true, ScopeSet(),
+ GoogleServiceAuthError::AuthErrorNone(), access_token,
expiration);
}
« no previous file with comments | « components/signin/core/browser/fake_profile_oauth2_token_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698