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

Unified Diff: ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.h

Issue 2121083004: Upstream ProfileOAuth2TokenServiceProviderImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style nits Created 4 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
Index: ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.h
diff --git a/ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.h b/ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..bab054fbbda13da8d8a9b41c333a582c3cd6839f
--- /dev/null
+++ b/ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.h
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_IMPL_H_
+#define IOS_CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_IMPL_H_
+
+#include <string>
+#include <vector>
+
+#include "base/macros.h"
+#include "components/signin/ios/browser/profile_oauth2_token_service_ios_provider.h"
+
+// Implementation of ProfileOAuth2TokenServiceIOSProvider.
+class ProfileOAuth2TokenServiceIOSProviderImpl
+ : public ProfileOAuth2TokenServiceIOSProvider {
+ public:
+ ProfileOAuth2TokenServiceIOSProviderImpl();
+ ~ProfileOAuth2TokenServiceIOSProviderImpl() override;
+
+ // ios::ProfileOAuth2TokenServiceIOSProvider
+ void GetAccessToken(const std::string& gaia_id,
+ const std::string& client_id,
+ const std::string& client_secret,
+ const std::set<std::string>& scopes,
+ const AccessTokenCallback& callback) override;
+ std::vector<AccountInfo> GetAllAccounts() const override;
+ AuthenticationErrorCategory GetAuthenticationErrorCategory(
+ const std::string& gaia_id,
+ NSError* error) const override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceIOSProviderImpl);
+};
+
+#endif // IOS_CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698