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

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

Issue 6166010: net: Remove typedef net::URLRequestStatus URLRequestStatus; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 2010 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/cookie_fetcher.h" 5 #include "chrome/browser/chromeos/login/cookie_fetcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "chrome/browser/chromeos/boot_times_loader.h" 9 #include "chrome/browser/chromeos/boot_times_loader.h"
10 #include "chrome/browser/chromeos/login/client_login_response_handler.h" 10 #include "chrome/browser/chromeos/login/client_login_response_handler.h"
11 #include "chrome/browser/chromeos/login/issue_response_handler.h" 11 #include "chrome/browser/chromeos/login/issue_response_handler.h"
(...skipping 15 matching lines...) Expand all
27 new IssueResponseHandler(profile_->GetRequestContext())); 27 new IssueResponseHandler(profile_->GetRequestContext()));
28 } 28 }
29 29
30 void CookieFetcher::AttemptFetch(const std::string& credentials) { 30 void CookieFetcher::AttemptFetch(const std::string& credentials) {
31 VLOG(1) << "Getting auth token..."; 31 VLOG(1) << "Getting auth token...";
32 fetcher_.reset(client_login_handler_->Handle(credentials, this)); 32 fetcher_.reset(client_login_handler_->Handle(credentials, this));
33 } 33 }
34 34
35 void CookieFetcher::OnURLFetchComplete(const URLFetcher* source, 35 void CookieFetcher::OnURLFetchComplete(const URLFetcher* source,
36 const GURL& url, 36 const GURL& url,
37 const URLRequestStatus& status, 37 const net::URLRequestStatus& status,
38 int response_code, 38 int response_code,
39 const ResponseCookies& cookies, 39 const ResponseCookies& cookies,
40 const std::string& data) { 40 const std::string& data) {
41 if (status.is_success() && response_code == kHttpSuccess) { 41 if (status.is_success() && response_code == kHttpSuccess) {
42 if (issue_handler_->CanHandle(url)) { 42 if (issue_handler_->CanHandle(url)) {
43 VLOG(1) << "Handling auth token"; 43 VLOG(1) << "Handling auth token";
44 fetcher_.reset(issue_handler_->Handle(data, this)); 44 fetcher_.reset(issue_handler_->Handle(data, this));
45 return; 45 return;
46 } 46 }
47 } 47 }
48 BootTimesLoader::Get()->AddLoginTimeMarker("CookiesFetched", false); 48 BootTimesLoader::Get()->AddLoginTimeMarker("CookiesFetched", false);
49 delete this; 49 delete this;
50 } 50 }
51 51
52 } // namespace chromeos 52 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/bug_report_util.cc ('k') | chrome/browser/chromeos/login/cookie_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698