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

Side by Side Diff: chrome/browser/chromeos/login/client_login_response_handler.cc

Issue 9572001: Do cookie checks in NetworkDelegate instead of the URLRequest::Delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/chromeos/login/client_login_response_handler.h" 5 #include "chrome/browser/chromeos/login/client_login_response_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/net/chrome_url_request_context.h" 10 #include "chrome/browser/net/chrome_url_request_context.h"
11 #include "chrome/common/net/gaia/gaia_urls.h" 11 #include "chrome/common/net/gaia/gaia_urls.h"
12 #include "content/public/common/content_url_request_user_data.h"
12 #include "content/public/common/url_fetcher.h" 13 #include "content/public/common/url_fetcher.h"
13 #include "net/base/load_flags.h" 14 #include "net/base/load_flags.h"
14 15
15 namespace chromeos { 16 namespace chromeos {
16 17
17 // By setting "service=gaia", we get an uber-auth-token back. 18 // By setting "service=gaia", we get an uber-auth-token back.
18 const char ClientLoginResponseHandler::kService[] = "service=gaia"; 19 const char ClientLoginResponseHandler::kService[] = "service=gaia";
19 20
20 // Overridden from AuthResponseHandler. 21 // Overridden from AuthResponseHandler.
21 bool ClientLoginResponseHandler::CanHandle(const GURL& url) { 22 bool ClientLoginResponseHandler::CanHandle(const GURL& url) {
(...skipping 12 matching lines...) Expand all
34 35
35 content::URLFetcher* fetcher = content::URLFetcher::Create( 36 content::URLFetcher* fetcher = content::URLFetcher::Create(
36 GURL(GaiaUrls::GetInstance()->issue_auth_token_url()), 37 GURL(GaiaUrls::GetInstance()->issue_auth_token_url()),
37 content::URLFetcher::POST, 38 content::URLFetcher::POST,
38 catcher); 39 catcher);
39 fetcher->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES); 40 fetcher->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES);
40 fetcher->SetUploadData("application/x-www-form-urlencoded", payload_); 41 fetcher->SetUploadData("application/x-www-form-urlencoded", payload_);
41 if (getter_) { 42 if (getter_) {
42 VLOG(1) << "Fetching " << GaiaUrls::GetInstance()->issue_auth_token_url(); 43 VLOG(1) << "Fetching " << GaiaUrls::GetInstance()->issue_auth_token_url();
43 fetcher->SetRequestContext(getter_); 44 fetcher->SetRequestContext(getter_);
45 // TODO(jochen): Do cookie audit.
46 fetcher->SetContentURLRequestUserData(
47 new content::ContentURLRequestUserData());
44 fetcher->Start(); 48 fetcher->Start();
45 } 49 }
46 return fetcher; 50 return fetcher;
47 } 51 }
48 52
49 } // namespace chromeos 53 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698