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

Unified Diff: sync/internal_api/attachments/attachment_uploader_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_uploader_impl_unittest.cc
diff --git a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc b/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc
index 527b00e601d19db7b15b5a534e07daaaef2db166..8d57e2c07ffcb1e0b7e43f8e909c50ecc38837f1 100644
--- a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc
+++ b/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc
@@ -90,10 +90,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:
GoogleServiceAuthError response_error_;
@@ -137,7 +137,7 @@ void MockOAuth2TokenService::FetchOAuth2Token(
response_expiration_));
}
-void MockOAuth2TokenService::InvalidateOAuth2Token(
+void MockOAuth2TokenService::InvalidateAccessTokenImpl(
const std::string& account_id,
const std::string& client_id,
const ScopeSet& scopes,
@@ -318,7 +318,7 @@ void AttachmentUploaderImplTest::RunAndWaitFor(int num_uploads) {
Attachment AttachmentUploaderImplTest::UploadAndRespondWith(
const net::HttpStatusCode& status_code) {
- token_service().AddAccount(kAccountId);
+ token_service().GetDelegate()->UpdateCredentials(kAccountId, "refresh_token");
request_handler().SetStatusCode(status_code);
scoped_refptr<base::RefCountedString> some_data(new base::RefCountedString);
some_data->data() = kAttachmentData;

Powered by Google App Engine
This is Rietveld 408576698