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

Side by Side Diff: net/url_request/url_request_ftp_job.h

Issue 8340026: Use AuthCredentials throughout the network stack instead of username/password. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix comments Created 9 years, 1 month 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
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_ftp_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/string16.h"
12 #include "base/task.h" 11 #include "base/task.h"
13 #include "net/base/auth.h" 12 #include "net/base/auth.h"
14 #include "net/base/completion_callback.h" 13 #include "net/base/completion_callback.h"
15 #include "net/ftp/ftp_request_info.h" 14 #include "net/ftp/ftp_request_info.h"
16 #include "net/ftp/ftp_transaction.h" 15 #include "net/ftp/ftp_transaction.h"
17 #include "net/url_request/url_request_job.h" 16 #include "net/url_request/url_request_job.h"
18 17
19 namespace net { 18 namespace net {
20 19
21 class URLRequestContext; 20 class URLRequestContext;
(...skipping 17 matching lines...) Expand all
39 void StartTransaction(); 38 void StartTransaction();
40 39
41 void OnStartCompleted(int result); 40 void OnStartCompleted(int result);
42 void OnReadCompleted(int result); 41 void OnReadCompleted(int result);
43 42
44 void RestartTransactionWithAuth(); 43 void RestartTransactionWithAuth();
45 44
46 void LogFtpServerType(char server_type); 45 void LogFtpServerType(char server_type);
47 46
48 // Overridden from URLRequestJob: 47 // Overridden from URLRequestJob:
49 virtual void Start(); 48 virtual void Start() OVERRIDE;
50 virtual void Kill(); 49 virtual void Kill() OVERRIDE;
51 virtual LoadState GetLoadState() const; 50 virtual LoadState GetLoadState() const OVERRIDE;
52 virtual bool NeedsAuth(); 51 virtual bool NeedsAuth() OVERRIDE;
53 virtual void GetAuthChallengeInfo( 52 virtual void GetAuthChallengeInfo(
54 scoped_refptr<AuthChallengeInfo>* auth_info); 53 scoped_refptr<AuthChallengeInfo>* auth_info) OVERRIDE;
55 virtual void SetAuth(const string16& username, 54 virtual void SetAuth(const AuthCredentials& credentials) OVERRIDE;
56 const string16& password); 55 virtual void CancelAuth() OVERRIDE;
57 virtual void CancelAuth();
58 56
59 // TODO(ibrar): Yet to give another look at this function. 57 // TODO(ibrar): Yet to give another look at this function.
60 virtual uint64 GetUploadProgress() const; 58 virtual uint64 GetUploadProgress() const;
61 virtual bool ReadRawData(IOBuffer* buf, int buf_size, int *bytes_read); 59 virtual bool ReadRawData(IOBuffer* buf, int buf_size, int *bytes_read);
62 60
63 FtpRequestInfo request_info_; 61 FtpRequestInfo request_info_;
64 scoped_ptr<FtpTransaction> transaction_; 62 scoped_ptr<FtpTransaction> transaction_;
65 63
66 OldCompletionCallbackImpl<URLRequestFtpJob> start_callback_; 64 OldCompletionCallbackImpl<URLRequestFtpJob> start_callback_;
67 OldCompletionCallbackImpl<URLRequestFtpJob> read_callback_; 65 OldCompletionCallbackImpl<URLRequestFtpJob> read_callback_;
68 66
69 bool read_in_progress_; 67 bool read_in_progress_;
70 68
71 scoped_refptr<AuthData> server_auth_; 69 scoped_refptr<AuthData> server_auth_;
72 70
73 // Keep a reference to the url request context to be sure it's not deleted 71 // Keep a reference to the url request context to be sure it's not deleted
74 // before us. 72 // before us.
75 scoped_refptr<const URLRequestContext> context_; 73 scoped_refptr<const URLRequestContext> context_;
76 74
77 ScopedRunnableMethodFactory<URLRequestFtpJob> method_factory_; 75 ScopedRunnableMethodFactory<URLRequestFtpJob> method_factory_;
78 76
79 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); 77 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob);
80 }; 78 };
81 79
82 } // namespace net 80 } // namespace net
83 81
84 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ 82 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_ftp_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698