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

Unified Diff: google_apis/gaia/fake_gaia.cc

Issue 1282393002: Pass "client_id" param to the enrollment frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/fake_gaia.cc
diff --git a/google_apis/gaia/fake_gaia.cc b/google_apis/gaia/fake_gaia.cc
index 6749393faa85d08bf7d20421cc1446c1dd285f8a..54803967819c83c9d91814dd78d222613580c230 100644
--- a/google_apis/gaia/fake_gaia.cc
+++ b/google_apis/gaia/fake_gaia.cc
@@ -480,6 +480,15 @@ void FakeGaia::HandleServiceLogin(const HttpRequest& request,
void FakeGaia::HandleEmbeddedSetupChromeos(const HttpRequest& request,
BasicHttpResponse* http_response) {
+ GURL request_url = GURL("http://localhost").Resolve(request.relative_url);
+ std::string client_id;
+ if (!GetQueryParameter(request_url.query(), "client_id", &client_id) ||
+ GaiaUrls::GetInstance()->oauth2_chrome_client_id() != client_id) {
+ LOG(ERROR) << "Missing or invalid param 'client_id' in "
+ "/embedded/setup/chromeos call";
+ return;
+ }
+
http_response->set_code(net::HTTP_OK);
http_response->set_content(embedded_setup_chromeos_response_);
http_response->set_content_type("text/html");
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698