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

Side by Side Diff: net/ftp/ftp_transaction.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/ftp/ftp_network_transaction_unittest.cc ('k') | net/http/http_auth.h » ('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_FTP_FTP_TRANSACTION_H_ 5 #ifndef NET_FTP_FTP_TRANSACTION_H_
6 #define NET_FTP_FTP_TRANSACTION_H_ 6 #define NET_FTP_FTP_TRANSACTION_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h"
10 #include "net/base/completion_callback.h" 9 #include "net/base/completion_callback.h"
11 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
12 #include "net/base/load_states.h" 11 #include "net/base/load_states.h"
13 #include "net/base/net_export.h" 12 #include "net/base/net_export.h"
14 13
15 namespace net { 14 namespace net {
16 15
16 class AuthCredentials;
17 class FtpResponseInfo; 17 class FtpResponseInfo;
18 class FtpRequestInfo; 18 class FtpRequestInfo;
19 class BoundNetLog; 19 class BoundNetLog;
20 20
21 // Represents a single FTP transaction. 21 // Represents a single FTP transaction.
22 class NET_EXPORT_PRIVATE FtpTransaction { 22 class NET_EXPORT_PRIVATE FtpTransaction {
23 public: 23 public:
24 // Stops any pending IO and destroys the transaction object. 24 // Stops any pending IO and destroys the transaction object.
25 virtual ~FtpTransaction() {} 25 virtual ~FtpTransaction() {}
26 26
(...skipping 10 matching lines...) Expand all
37 // request_info object alive until Destroy is called on the transaction. 37 // request_info object alive until Destroy is called on the transaction.
38 // 38 //
39 // NOTE: The transaction is not responsible for deleting the callback object. 39 // NOTE: The transaction is not responsible for deleting the callback object.
40 // 40 //
41 // Profiling information for the request is saved to |net_log| if non-NULL. 41 // Profiling information for the request is saved to |net_log| if non-NULL.
42 virtual int Start(const FtpRequestInfo* request_info, 42 virtual int Start(const FtpRequestInfo* request_info,
43 OldCompletionCallback* callback, 43 OldCompletionCallback* callback,
44 const BoundNetLog& net_log) = 0; 44 const BoundNetLog& net_log) = 0;
45 45
46 // Restarts the FTP transaction with authentication credentials. 46 // Restarts the FTP transaction with authentication credentials.
47 virtual int RestartWithAuth(const string16& username, 47 virtual int RestartWithAuth(const AuthCredentials& credentials,
48 const string16& password,
49 OldCompletionCallback* callback) = 0; 48 OldCompletionCallback* callback) = 0;
50 49
51 // Once response info is available for the transaction, response data may be 50 // Once response info is available for the transaction, response data may be
52 // read by calling this method. 51 // read by calling this method.
53 // 52 //
54 // Response data is copied into the given buffer and the number of bytes 53 // Response data is copied into the given buffer and the number of bytes
55 // copied is returned. ERR_IO_PENDING is returned if response data is not 54 // copied is returned. ERR_IO_PENDING is returned if response data is not
56 // yet available. The OldCompletionCallback is notified when the data copy 55 // yet available. The OldCompletionCallback is notified when the data copy
57 // completes, and it is passed the number of bytes that were successfully 56 // completes, and it is passed the number of bytes that were successfully
58 // copied. Or, if a read error occurs, the OldCompletionCallback is notified of 57 // copied. Or, if a read error occurs, the OldCompletionCallback is notified of
(...skipping 14 matching lines...) Expand all
73 virtual LoadState GetLoadState() const = 0; 72 virtual LoadState GetLoadState() const = 0;
74 73
75 // Returns the upload progress in bytes. If there is no upload data, 74 // Returns the upload progress in bytes. If there is no upload data,
76 // zero will be returned. 75 // zero will be returned.
77 virtual uint64 GetUploadProgress() const = 0; 76 virtual uint64 GetUploadProgress() const = 0;
78 }; 77 };
79 78
80 } // namespace net 79 } // namespace net
81 80
82 #endif // NET_FTP_FTP_TRANSACTION_H_ 81 #endif // NET_FTP_FTP_TRANSACTION_H_
OLDNEW
« no previous file with comments | « net/ftp/ftp_network_transaction_unittest.cc ('k') | net/http/http_auth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698