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

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

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.cc
diff --git a/chrome/browser/local_discovery/cloud_print_base_api_flow.cc b/chrome/browser/local_discovery/cloud_print_base_api_flow.cc
index 870bf287c425772bb70a126c0320d4fc01338b69..5330c613306e9a8a8f44aec8952bb41d871d741b 100644
--- a/chrome/browser/local_discovery/cloud_print_base_api_flow.cc
+++ b/chrome/browser/local_discovery/cloud_print_base_api_flow.cc
@@ -27,6 +27,7 @@ CloudPrintBaseApiFlow::CloudPrintBaseApiFlow(
Delegate* delegate)
: request_context_(request_context),
token_service_(token_service),
+ user_index_(kAccountIndexUseOAuth2),
url_(automated_claim_url),
delegate_(delegate) {
}
@@ -69,17 +70,19 @@ void CloudPrintBaseApiFlow::Start() {
GURL cookie_url;
char separator_character = '?';
- if (url_.spec().find_first_of('?') == std::string::npos) {
- separator_character = '&'
+ if (url_.spec().find_first_of('?') != std::string::npos) {
+ separator_character = '&';
}
if (xsrf_token_.empty()) {
cookie_url = GURL(base::StringPrintf(kCookieURLFormatNoXSRF,
url_.spec().c_str(),
+ separator_character,
Vitaly Buka (NO REVIEWS) 2013/09/04 21:46:25 Please use net::AppendQueryParameter(
Noam Samuel 2013/09/05 23:08:31 Done.
user_index_));
} else {
cookie_url = GURL(base::StringPrintf(kCookieURLFormat,
url_.spec().c_str(),
+ separator_character,
xsrf_token_.c_str(),
user_index_));
}

Powered by Google App Engine
This is Rietveld 408576698