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

Side by Side Diff: google_apis/gaia/fake_gaia.h

Issue 1873663002: Convert //google_apis from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef GOOGLE_APIS_GAIA_FAKE_GAIA_H_ 5 #ifndef GOOGLE_APIS_GAIA_FAKE_GAIA_H_
6 #define GOOGLE_APIS_GAIA_FAKE_GAIA_H_ 6 #define GOOGLE_APIS_GAIA_FAKE_GAIA_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <set> 10 #include <set>
10 #include <string> 11 #include <string>
11 12
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace base { 17 namespace base {
18 class DictionaryValue; 18 class DictionaryValue;
19 } 19 }
20 20
21 namespace net { 21 namespace net {
22 namespace test_server { 22 namespace test_server {
23 class BasicHttpResponse; 23 class BasicHttpResponse;
24 struct HttpRequest; 24 struct HttpRequest;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // an email address, a default GAIA Id is used. 99 // an email address, a default GAIA Id is used.
100 void MapEmailToGaiaId(const std::string& email, const std::string& gaia_id); 100 void MapEmailToGaiaId(const std::string& email, const std::string& gaia_id);
101 101
102 // Initializes HTTP request handlers. Should be called after switches 102 // Initializes HTTP request handlers. Should be called after switches
103 // for tweaking GaiaUrls are in place. 103 // for tweaking GaiaUrls are in place.
104 void Initialize(); 104 void Initialize();
105 105
106 // Handles a request and returns a response if the request was recognized as a 106 // Handles a request and returns a response if the request was recognized as a
107 // GAIA request. Note that this respects the switches::kGaiaUrl and friends so 107 // GAIA request. Note that this respects the switches::kGaiaUrl and friends so
108 // that this can used with EmbeddedTestServer::RegisterRequestHandler(). 108 // that this can used with EmbeddedTestServer::RegisterRequestHandler().
109 scoped_ptr<net::test_server::HttpResponse> HandleRequest( 109 std::unique_ptr<net::test_server::HttpResponse> HandleRequest(
110 const net::test_server::HttpRequest& request); 110 const net::test_server::HttpRequest& request);
111 111
112 // Configures an OAuth2 token that'll be returned when a client requests an 112 // Configures an OAuth2 token that'll be returned when a client requests an
113 // access token for the given auth token, which can be a refresh token or an 113 // access token for the given auth token, which can be a refresh token or an
114 // login-scoped access token for the token minting endpoint. Note that the 114 // login-scoped access token for the token minting endpoint. Note that the
115 // scope and audience requested by the client need to match the token_info. 115 // scope and audience requested by the client need to match the token_info.
116 void IssueOAuthToken(const std::string& auth_token, 116 void IssueOAuthToken(const std::string& auth_token,
117 const AccessTokenInfo& token_info); 117 const AccessTokenInfo& token_info);
118 118
119 // Associates an account id with a SAML IdP redirect endpoint. When a 119 // Associates an account id with a SAML IdP redirect endpoint. When a
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 SamlAccountIdpMap saml_account_idp_map_; 245 SamlAccountIdpMap saml_account_idp_map_;
246 SamlDomainRedirectUrlMap saml_domain_url_map_; 246 SamlDomainRedirectUrlMap saml_domain_url_map_;
247 bool issue_oauth_code_cookie_; 247 bool issue_oauth_code_cookie_;
248 RefreshTokenToDeviceIdMap refresh_token_to_device_id_map_; 248 RefreshTokenToDeviceIdMap refresh_token_to_device_id_map_;
249 std::string prefilled_email_; 249 std::string prefilled_email_;
250 250
251 DISALLOW_COPY_AND_ASSIGN(FakeGaia); 251 DISALLOW_COPY_AND_ASSIGN(FakeGaia);
252 }; 252 };
253 253
254 #endif // GOOGLE_APIS_GAIA_FAKE_GAIA_H_ 254 #endif // GOOGLE_APIS_GAIA_FAKE_GAIA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698