OLD | NEW |
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 #ifndef CHROME_BROWSER_REMOTING_DIRECTORY_ADD_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_REMOTING_DIRECTORY_ADD_REQUEST_H_ |
6 #define CHROME_BROWSER_REMOTING_DIRECTORY_ADD_REQUEST_H_ | 6 #define CHROME_BROWSER_REMOTING_DIRECTORY_ADD_REQUEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // Add this computer as a host. Use the token for | 48 // Add this computer as a host. Use the token for |
49 // authentication. |done_callback| is called when the request is | 49 // authentication. |done_callback| is called when the request is |
50 // finished. Request can be cancelled by destroying this object. | 50 // finished. Request can be cancelled by destroying this object. |
51 void AddHost(const remoting::ChromotingHostInfo& host_info, | 51 void AddHost(const remoting::ChromotingHostInfo& host_info, |
52 const std::string& auth_token, | 52 const std::string& auth_token, |
53 DoneCallback* done_callback); | 53 DoneCallback* done_callback); |
54 | 54 |
55 // URLFetcher::Delegate implementation. | 55 // URLFetcher::Delegate implementation. |
56 virtual void OnURLFetchComplete(const URLFetcher* source, | 56 virtual void OnURLFetchComplete(const URLFetcher* source, |
57 const GURL& url, | 57 const GURL& url, |
58 const URLRequestStatus& status, | 58 const net::URLRequestStatus& status, |
59 int response_code, | 59 int response_code, |
60 const ResponseCookies& cookies, | 60 const ResponseCookies& cookies, |
61 const std::string& data); | 61 const std::string& data); |
62 | 62 |
63 private: | 63 private: |
64 friend class DirectoryAddRequestTest; | 64 friend class DirectoryAddRequestTest; |
65 | 65 |
66 URLRequestContextGetter* getter_; | 66 URLRequestContextGetter* getter_; |
67 scoped_ptr<DoneCallback> done_callback_; | 67 scoped_ptr<DoneCallback> done_callback_; |
68 scoped_ptr<URLFetcher> fetcher_; | 68 scoped_ptr<URLFetcher> fetcher_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(DirectoryAddRequest); | 70 DISALLOW_COPY_AND_ASSIGN(DirectoryAddRequest); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace remoting | 73 } // namespace remoting |
74 | 74 |
75 #endif // CHROME_BROWSER_REMOTING_DIRECTORY_ADD_REQUEST_H_ | 75 #endif // CHROME_BROWSER_REMOTING_DIRECTORY_ADD_REQUEST_H_ |
OLD | NEW |