OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_APP_NOTIFY_CHANNEL_SETUP_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_NOTIFY_CHANNEL_SETUP_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_APP_NOTIFY_CHANNEL_SETUP_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_APP_NOTIFY_CHANNEL_SETUP_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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 std::string client_id_; | 142 std::string client_id_; |
143 GURL requestor_url_; | 143 GURL requestor_url_; |
144 int return_route_id_; | 144 int return_route_id_; |
145 int callback_id_; | 145 int callback_id_; |
146 base::WeakPtr<Delegate> delegate_; | 146 base::WeakPtr<Delegate> delegate_; |
147 scoped_ptr<content::URLFetcher> url_fetcher_; | 147 scoped_ptr<content::URLFetcher> url_fetcher_; |
148 scoped_ptr<OAuth2AccessTokenFetcher> oauth2_fetcher_; | 148 scoped_ptr<OAuth2AccessTokenFetcher> oauth2_fetcher_; |
149 scoped_ptr<AppNotifyChannelUI> ui_; | 149 scoped_ptr<AppNotifyChannelUI> ui_; |
150 State state_; | 150 State state_; |
151 std::string oauth2_access_token_; | 151 std::string oauth2_access_token_; |
| 152 // Keeps track of whether we have encountered failure in OAuth2 access |
| 153 // token generation already. We use this to prevent us from doing an |
| 154 // infinite loop of trying to generate access token, if that fails, try |
| 155 // to login the user and generate access token, etc. |
| 156 bool oauth2_access_token_failure_; |
152 | 157 |
153 DISALLOW_COPY_AND_ASSIGN(AppNotifyChannelSetup); | 158 DISALLOW_COPY_AND_ASSIGN(AppNotifyChannelSetup); |
154 }; | 159 }; |
155 | 160 |
156 #endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFY_CHANNEL_SETUP_H_ | 161 #endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFY_CHANNEL_SETUP_H_ |
OLD | NEW |