Index: chrome/browser/local_discovery/cloud_print_base_api_flow.h |
diff --git a/chrome/browser/local_discovery/cloud_print_base_api_flow.h b/chrome/browser/local_discovery/cloud_print_base_api_flow.h |
index 151a788bb7850e35d211f5495fb0afe82df598fa..b60ecf1d766c9da6c44a0c15882007cbf2936b04 100644 |
--- a/chrome/browser/local_discovery/cloud_print_base_api_flow.h |
+++ b/chrome/browser/local_discovery/cloud_print_base_api_flow.h |
@@ -7,6 +7,7 @@ |
#include <string> |
+#include "chrome/browser/local_discovery/privet_constants.h" |
#include "chrome/browser/local_discovery/privet_http.h" |
#include "google_apis/gaia/oauth2_token_service.h" |
#include "net/url_request/url_fetcher.h" |
@@ -76,8 +77,11 @@ class CloudPrintBaseApiFlow : public net::URLFetcherDelegate, |
virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, |
const GoogleServiceAuthError& error) OVERRIDE; |
+ // Return the user index or kAccountIndexUseOAuth2 if none is available. |
+ int user_index() { return user_index_; } |
+ |
private: |
- bool UseOAuth2() { return token_service_ != NULL; } |
+ bool UseOAuth2() { return user_index_ == kAccountIndexUseOAuth2; } |
void CreateRequest(const GURL& url); |