OLD | NEW |
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 CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" | 8 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" |
9 #include "chrome/browser/signin/ubertoken_fetcher.h" | |
10 #include "chrome/browser/ui/host_desktop.h" | 9 #include "chrome/browser/ui/host_desktop.h" |
11 #include "chrome/common/extensions/api/identity/oauth2_manifest_handler.h" | 10 #include "chrome/common/extensions/api/identity/oauth2_manifest_handler.h" |
| 11 #include "google_apis/gaia/ubertoken_fetcher.h" |
12 | 12 |
13 namespace extensions { | 13 namespace extensions { |
14 | 14 |
15 // Implements a web-based OAuth2 scope approval dialog. This flow has | 15 // Implements a web-based OAuth2 scope approval dialog. This flow has |
16 // four parts: | 16 // four parts: |
17 // 1. Fetch an ubertoken for the signed-in user. | 17 // 1. Fetch an ubertoken for the signed-in user. |
18 // 2. Use the ubertoken to get session cookies using MergeSession. | 18 // 2. Use the ubertoken to get session cookies using MergeSession. |
19 // 3. Start the OAuth flow and wait for final redirect. | 19 // 3. Start the OAuth flow and wait for final redirect. |
20 // 4. Parse results from the fragment component of the final redirect URI. | 20 // 4. Parse results from the fragment component of the final redirect URI. |
21 // | 21 // |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 GURL auth_url_; | 90 GURL auth_url_; |
91 scoped_ptr<UbertokenFetcher> ubertoken_fetcher_; | 91 scoped_ptr<UbertokenFetcher> ubertoken_fetcher_; |
92 scoped_ptr<WebAuthFlow> web_flow_; | 92 scoped_ptr<WebAuthFlow> web_flow_; |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(GaiaWebAuthFlow); | 94 DISALLOW_COPY_AND_ASSIGN(GaiaWebAuthFlow); |
95 }; | 95 }; |
96 | 96 |
97 } // extensions | 97 } // extensions |
98 | 98 |
99 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ | 99 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ |
OLD | NEW |