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

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

Issue 1707773002: Revert of Remove HostDesktopType from AppLaunchParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-15
Patch Set: rebase Created 4 years, 10 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 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/extensions/api/identity/extension_token_key.h" 9 #include "chrome/browser/extensions/api/identity/extension_token_key.h"
10 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" 10 #include "chrome/browser/extensions/api/identity/web_auth_flow.h"
11 #include "chrome/browser/ui/host_desktop.h"
11 #include "extensions/common/manifest_handlers/oauth2_manifest_handler.h" 12 #include "extensions/common/manifest_handlers/oauth2_manifest_handler.h"
12 #include "google_apis/gaia/ubertoken_fetcher.h" 13 #include "google_apis/gaia/ubertoken_fetcher.h"
13 14
14 namespace extensions { 15 namespace extensions {
15 16
16 // Implements a web-based OAuth2 scope approval dialog. This flow has 17 // Implements a web-based OAuth2 scope approval dialog. This flow has
17 // four parts: 18 // four parts:
18 // 1. Fetch an ubertoken for a signed-in user. 19 // 1. Fetch an ubertoken for a signed-in user.
19 // 2. Use the ubertoken to get session cookies using MergeSession. 20 // 2. Use the ubertoken to get session cookies using MergeSession.
20 // 3. Start the OAuth flow and wait for final redirect. 21 // 3. Start the OAuth flow and wait for final redirect.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void OnAuthFlowTitleChange(const std::string& title) override; 80 void OnAuthFlowTitleChange(const std::string& title) override;
80 81
81 private: 82 private:
82 // Creates a WebAuthFlow, which will navigate to |url|. Can override 83 // Creates a WebAuthFlow, which will navigate to |url|. Can override
83 // for testing. Used to kick off the MergeSession (step #2). 84 // for testing. Used to kick off the MergeSession (step #2).
84 virtual scoped_ptr<WebAuthFlow> CreateWebAuthFlow(GURL url); 85 virtual scoped_ptr<WebAuthFlow> CreateWebAuthFlow(GURL url);
85 86
86 Delegate* delegate_; 87 Delegate* delegate_;
87 Profile* profile_; 88 Profile* profile_;
88 std::string account_id_; 89 std::string account_id_;
90 chrome::HostDesktopType host_desktop_type_;
89 std::string redirect_scheme_; 91 std::string redirect_scheme_;
90 std::string redirect_path_prefix_; 92 std::string redirect_path_prefix_;
91 GURL auth_url_; 93 GURL auth_url_;
92 scoped_ptr<UbertokenFetcher> ubertoken_fetcher_; 94 scoped_ptr<UbertokenFetcher> ubertoken_fetcher_;
93 scoped_ptr<WebAuthFlow> web_flow_; 95 scoped_ptr<WebAuthFlow> web_flow_;
94 96
95 DISALLOW_COPY_AND_ASSIGN(GaiaWebAuthFlow); 97 DISALLOW_COPY_AND_ASSIGN(GaiaWebAuthFlow);
96 }; 98 };
97 99
98 } // namespace extensions 100 } // namespace extensions
99 101
100 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_ 102 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_GAIA_WEB_AUTH_FLOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698