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

Unified Diff: sync/internal_api/attachments/attachment_downloader_impl_unittest.cc

Issue 1143323005: Refactor AO2TS to make it easier to componentize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address roger's comments Created 5 years, 7 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: sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
diff --git a/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc b/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
index 0cae099337e11942ea598066ca02b2dd5676ceea..0cdc673aacb8bbb2edb08d702b9e909ae91d259d 100644
--- a/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
+++ b/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
@@ -54,10 +54,10 @@ class MockOAuth2TokenService : public FakeOAuth2TokenService {
const std::string& client_secret,
const ScopeSet& scopes) override;
- void InvalidateOAuth2Token(const std::string& account_id,
- const std::string& client_id,
- const ScopeSet& scopes,
- const std::string& access_token) override;
+ void InvalidateAccessTokenImpl(const std::string& account_id,
+ const std::string& client_id,
+ const ScopeSet& scopes,
+ const std::string& access_token) override;
private:
base::WeakPtr<RequestImpl> last_request_;
@@ -94,7 +94,7 @@ void MockOAuth2TokenService::FetchOAuth2Token(
last_request_ = request->AsWeakPtr();
}
-void MockOAuth2TokenService::InvalidateOAuth2Token(
+void MockOAuth2TokenService::InvalidateAccessTokenImpl(
const std::string& account_id,
const std::string& client_id,
const ScopeSet& scopes,
@@ -208,7 +208,7 @@ void AttachmentDownloaderImplTest::SetUp() {
new net::TestURLRequestContextGetter(message_loop_.message_loop_proxy());
url_fetcher_factory_.set_remove_fetcher_on_delete(true);
token_service_.reset(new MockOAuth2TokenService());
- token_service_->AddAccount(kAccountId);
+ token_service_->GetDelegate()->UpdateCredentials(kAccountId, "refresh_token");
scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>
token_service_provider(new TokenServiceProvider(token_service_.get()));

Powered by Google App Engine
This is Rietveld 408576698