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

Unified Diff: chrome/browser/local_discovery/cloud_print_base_api_flow.h

Issue 23658020: Printer list for Google Cloud Print (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698