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

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

Issue 12929014: Identity API: Pop-up a sign-in dialog if gaia credentials are bad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 7 years, 9 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) 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 <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 virtual void ShowOAuthApprovalDialog(const IssueAdviceInfo& issue_advice); 81 virtual void ShowOAuthApprovalDialog(const IssueAdviceInfo& issue_advice);
82 // Caller owns the returned instance. 82 // Caller owns the returned instance.
83 virtual OAuth2MintTokenFlow* CreateMintTokenFlow( 83 virtual OAuth2MintTokenFlow* CreateMintTokenFlow(
84 OAuth2MintTokenFlow::Mode mode); 84 OAuth2MintTokenFlow::Mode mode);
85 85
86 // Checks if there is a master login token to mint tokens for the extension. 86 // Checks if there is a master login token to mint tokens for the extension.
87 virtual bool HasLoginToken() const; 87 virtual bool HasLoginToken() const;
88 88
89 bool interactive_; 89 bool interactive_;
90 scoped_ptr<OAuth2MintTokenFlow> flow_; 90 scoped_ptr<OAuth2MintTokenFlow> flow_;
91 bool should_retry_with_signin_;
91 92
92 // When launched in interactive mode, and if there is no existing grant, 93 // When launched in interactive mode, and if there is no existing grant,
93 // a permissions prompt will be popped up to the user. 94 // a permissions prompt will be popped up to the user.
94 scoped_ptr<ExtensionInstallPrompt> install_ui_; 95 scoped_ptr<ExtensionInstallPrompt> install_ui_;
95 }; 96 };
96 97
97 class IdentityLaunchWebAuthFlowFunction : public AsyncExtensionFunction, 98 class IdentityLaunchWebAuthFlowFunction : public AsyncExtensionFunction,
98 public WebAuthFlow::Delegate { 99 public WebAuthFlow::Delegate {
99 public: 100 public:
100 DECLARE_EXTENSION_FUNCTION("experimental.identity.launchWebAuthFlow", 101 DECLARE_EXTENSION_FUNCTION("experimental.identity.launchWebAuthFlow",
(...skipping 26 matching lines...) Expand all
127 // ProfileKeyedAPI implementation. 128 // ProfileKeyedAPI implementation.
128 static const char* service_name() { 129 static const char* service_name() {
129 return "IdentityAPI"; 130 return "IdentityAPI";
130 } 131 }
131 static const bool kServiceIsNULLWhileTesting = true; 132 static const bool kServiceIsNULLWhileTesting = true;
132 }; 133 };
133 134
134 } // namespace extensions 135 } // namespace extensions
135 136
136 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ 137 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698