OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GOOGLE_APIS_OPERATIONS_BASE_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_OPERATIONS_BASE_H_ |
6 #define CHROME_BROWSER_GOOGLE_APIS_OPERATIONS_BASE_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_OPERATIONS_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Overridden from AuthenticatedOperationInterface. | 94 // Overridden from AuthenticatedOperationInterface. |
95 virtual void Start(const std::string& auth_token) OVERRIDE; | 95 virtual void Start(const std::string& auth_token) OVERRIDE; |
96 | 96 |
97 // Overridden from AuthenticatedOperationInterface. | 97 // Overridden from AuthenticatedOperationInterface. |
98 virtual void SetReAuthenticateCallback( | 98 virtual void SetReAuthenticateCallback( |
99 const ReAuthenticateCallback& callback) OVERRIDE; | 99 const ReAuthenticateCallback& callback) OVERRIDE; |
100 | 100 |
101 protected: | 101 protected: |
102 explicit UrlFetchOperationBase(OperationRegistry* registry); | 102 explicit UrlFetchOperationBase(OperationRegistry* registry); |
103 UrlFetchOperationBase(OperationRegistry* registry, | 103 UrlFetchOperationBase(OperationRegistry* registry, |
104 OperationRegistry::OperationType type, | 104 OperationType type, |
105 const FilePath& path); | 105 const FilePath& path); |
106 virtual ~UrlFetchOperationBase(); | 106 virtual ~UrlFetchOperationBase(); |
107 | 107 |
108 // Gets URL for the request. | 108 // Gets URL for the request. |
109 virtual GURL GetURL() const = 0; | 109 virtual GURL GetURL() const = 0; |
110 // Returns the request type. A derived class should override this method | 110 // Returns the request type. A derived class should override this method |
111 // for a request type other than HTTP GET. | 111 // for a request type other than HTTP GET. |
112 virtual net::URLFetcher::RequestType GetRequestType() const; | 112 virtual net::URLFetcher::RequestType GetRequestType() const; |
113 // Returns the extra HTTP headers for the request. A derived class should | 113 // Returns the extra HTTP headers for the request. A derived class should |
114 // override this method to specify any extra headers needed for the request. | 114 // override this method to specify any extra headers needed for the request. |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 // Note: This should remain the last member so it'll be destroyed and | 226 // Note: This should remain the last member so it'll be destroyed and |
227 // invalidate its weak pointers before any other members are destroyed. | 227 // invalidate its weak pointers before any other members are destroyed. |
228 base::WeakPtrFactory<GetDataOperation> weak_ptr_factory_; | 228 base::WeakPtrFactory<GetDataOperation> weak_ptr_factory_; |
229 DISALLOW_COPY_AND_ASSIGN(GetDataOperation); | 229 DISALLOW_COPY_AND_ASSIGN(GetDataOperation); |
230 }; | 230 }; |
231 | 231 |
232 } // namespace gdata | 232 } // namespace gdata |
233 | 233 |
234 #endif // CHROME_BROWSER_GOOGLE_APIS_OPERATIONS_BASE_H_ | 234 #endif // CHROME_BROWSER_GOOGLE_APIS_OPERATIONS_BASE_H_ |
OLD | NEW |