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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_api.h

Issue 327403003: Identity API: add chrome.identity.getProfileUserInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add identity.email permission to stubs_app Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 scoped_ptr<ExtensionTokenKey> token_key_; 289 scoped_ptr<ExtensionTokenKey> token_key_;
290 std::string oauth2_client_id_; 290 std::string oauth2_client_id_;
291 // When launched in interactive mode, and if there is no existing grant, 291 // When launched in interactive mode, and if there is no existing grant,
292 // a permissions prompt will be popped up to the user. 292 // a permissions prompt will be popped up to the user.
293 IssueAdviceInfo issue_advice_; 293 IssueAdviceInfo issue_advice_;
294 scoped_ptr<GaiaWebAuthFlow> gaia_web_auth_flow_; 294 scoped_ptr<GaiaWebAuthFlow> gaia_web_auth_flow_;
295 scoped_ptr<IdentitySigninFlow> signin_flow_; 295 scoped_ptr<IdentitySigninFlow> signin_flow_;
296 }; 296 };
297 297
298 class IdentityGetProfileUserInfoFunction
299 : public ChromeUIThreadExtensionFunction {
300 public:
301 DECLARE_EXTENSION_FUNCTION("identity.getProfileUserInfo",
302 IDENTITY_GETPROFILEUSERINFO);
303
304 IdentityGetProfileUserInfoFunction();
305
306 private:
307 virtual ~IdentityGetProfileUserInfoFunction();
308
309 // UIThreadExtensionFunction implementation.
310 virtual ExtensionFunction::ResponseAction Run() OVERRIDE;
311 };
312
298 class IdentityRemoveCachedAuthTokenFunction 313 class IdentityRemoveCachedAuthTokenFunction
299 : public ChromeSyncExtensionFunction { 314 : public ChromeSyncExtensionFunction {
300 public: 315 public:
301 DECLARE_EXTENSION_FUNCTION("identity.removeCachedAuthToken", 316 DECLARE_EXTENSION_FUNCTION("identity.removeCachedAuthToken",
302 EXPERIMENTAL_IDENTITY_REMOVECACHEDAUTHTOKEN) 317 EXPERIMENTAL_IDENTITY_REMOVECACHEDAUTHTOKEN)
303 IdentityRemoveCachedAuthTokenFunction(); 318 IdentityRemoveCachedAuthTokenFunction();
304 319
305 protected: 320 protected:
306 virtual ~IdentityRemoveCachedAuthTokenFunction(); 321 virtual ~IdentityRemoveCachedAuthTokenFunction();
307 322
(...skipping 24 matching lines...) Expand all
332 // Helper to initialize final URL prefix. 347 // Helper to initialize final URL prefix.
333 void InitFinalRedirectURLPrefix(const std::string& extension_id); 348 void InitFinalRedirectURLPrefix(const std::string& extension_id);
334 349
335 scoped_ptr<WebAuthFlow> auth_flow_; 350 scoped_ptr<WebAuthFlow> auth_flow_;
336 GURL final_url_prefix_; 351 GURL final_url_prefix_;
337 }; 352 };
338 353
339 } // namespace extensions 354 } // namespace extensions
340 355
341 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ 356 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698