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

Side by Side Diff: chrome/service/gaia/service_gaia_authenticator.h

Issue 8375039: Create a content::UrlFetcher interface that lives in content/public/common and convert users to i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 9 years, 2 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 #ifndef CHROME_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_ 5 #ifndef CHROME_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_
6 #define CHROME_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_ 6 #define CHROME_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 14 matching lines...) Expand all
25 public content::URLFetcherDelegate, 25 public content::URLFetcherDelegate,
26 public gaia::GaiaAuthenticator { 26 public gaia::GaiaAuthenticator {
27 public: 27 public:
28 ServiceGaiaAuthenticator(const std::string& user_agent, 28 ServiceGaiaAuthenticator(const std::string& user_agent,
29 const std::string& service_id, 29 const std::string& service_id,
30 const std::string& gaia_url, 30 const std::string& gaia_url,
31 base::MessageLoopProxy* io_message_loop_proxy); 31 base::MessageLoopProxy* io_message_loop_proxy);
32 virtual ~ServiceGaiaAuthenticator(); 32 virtual ~ServiceGaiaAuthenticator();
33 33
34 // content::URLFetcherDelegate implementation. 34 // content::URLFetcherDelegate implementation.
35 virtual void OnURLFetchComplete(const URLFetcher *source) OVERRIDE; 35 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE;
36 36
37 protected: 37 protected:
38 // GaiaAuthenticator overrides. 38 // GaiaAuthenticator overrides.
39 virtual bool Post(const GURL& url, const std::string& post_body, 39 virtual bool Post(const GURL& url, const std::string& post_body,
40 unsigned long* response_code, std::string* response_body); 40 unsigned long* response_code, std::string* response_body);
41 virtual int GetBackoffDelaySeconds(int current_backoff_delay); 41 virtual int GetBackoffDelaySeconds(int current_backoff_delay);
42 42
43 private: 43 private:
44 void DoPost(const GURL& post_url, const std::string& post_body); 44 void DoPost(const GURL& post_url, const std::string& post_body);
45 45
46 base::WaitableEvent http_post_completed_; 46 base::WaitableEvent http_post_completed_;
47 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; 47 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
48 int http_response_code_; 48 int http_response_code_;
49 std::string response_data_; 49 std::string response_data_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(ServiceGaiaAuthenticator); 51 DISALLOW_COPY_AND_ASSIGN(ServiceGaiaAuthenticator);
52 }; 52 };
53 53
54 #endif // CHROME_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_ 54 #endif // CHROME_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/printer_job_handler.cc ('k') | chrome/service/gaia/service_gaia_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698