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

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

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

Powered by Google App Engine
This is Rietveld 408576698