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

Side by Side Diff: chrome/browser/google_apis/base_operations.h

Issue 11419221: google_apis: Remove document_url_ from EntryActionOperation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
« no previous file with comments | « no previous file | chrome/browser/google_apis/base_operations.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) 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_BASE_OPERATIONS_H_ 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_BASE_OPERATIONS_H_
6 #define CHROME_BROWSER_GOOGLE_APIS_BASE_OPERATIONS_H_ 6 #define CHROME_BROWSER_GOOGLE_APIS_BASE_OPERATIONS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 //============================ EntryActionOperation ============================ 185 //============================ EntryActionOperation ============================
186 186
187 // Callback type for Delete/Move DocumentServiceInterface calls. 187 // Callback type for Delete/Move DocumentServiceInterface calls.
188 typedef base::Callback<void(GDataErrorCode error)> EntryActionCallback; 188 typedef base::Callback<void(GDataErrorCode error)> EntryActionCallback;
189 189
190 // This class performs a simple action over a given entry (document/file). 190 // This class performs a simple action over a given entry (document/file).
191 // It is meant to be used for operations that return no JSON blobs. 191 // It is meant to be used for operations that return no JSON blobs.
192 class EntryActionOperation : public UrlFetchOperationBase { 192 class EntryActionOperation : public UrlFetchOperationBase {
193 public: 193 public:
194 EntryActionOperation(OperationRegistry* registry, 194 EntryActionOperation(OperationRegistry* registry,
195 const EntryActionCallback& callback, 195 const EntryActionCallback& callback);
196 const GURL& document_url);
197 virtual ~EntryActionOperation(); 196 virtual ~EntryActionOperation();
198 197
199 protected: 198 protected:
200 // Overridden from UrlFetchOperationBase. 199 // Overridden from UrlFetchOperationBase.
201 virtual void ProcessURLFetchResults(const net::URLFetcher* source) OVERRIDE; 200 virtual void ProcessURLFetchResults(const net::URLFetcher* source) OVERRIDE;
202 virtual void RunCallbackOnPrematureFailure(GDataErrorCode code) OVERRIDE; 201 virtual void RunCallbackOnPrematureFailure(GDataErrorCode code) OVERRIDE;
203 202
204 const GURL& document_url() const { return document_url_; }
205
206 private: 203 private:
207 EntryActionCallback callback_; 204 EntryActionCallback callback_;
208 GURL document_url_;
209 205
210 DISALLOW_COPY_AND_ASSIGN(EntryActionOperation); 206 DISALLOW_COPY_AND_ASSIGN(EntryActionOperation);
211 }; 207 };
212 208
213 //============================== GetDataOperation ============================== 209 //============================== GetDataOperation ==============================
214 210
215 // Callback type for DocumentServiceInterface::GetDocuments. 211 // Callback type for DocumentServiceInterface::GetDocuments.
216 // Note: feed_data argument should be passed using base::Passed(&feed_data), not 212 // Note: feed_data argument should be passed using base::Passed(&feed_data), not
217 // feed_data.Pass(). 213 // feed_data.Pass().
218 typedef base::Callback<void(GDataErrorCode error, 214 typedef base::Callback<void(GDataErrorCode error,
(...skipping 27 matching lines...) Expand all
246 242
247 // Note: This should remain the last member so it'll be destroyed and 243 // Note: This should remain the last member so it'll be destroyed and
248 // invalidate its weak pointers before any other members are destroyed. 244 // invalidate its weak pointers before any other members are destroyed.
249 base::WeakPtrFactory<GetDataOperation> weak_ptr_factory_; 245 base::WeakPtrFactory<GetDataOperation> weak_ptr_factory_;
250 DISALLOW_COPY_AND_ASSIGN(GetDataOperation); 246 DISALLOW_COPY_AND_ASSIGN(GetDataOperation);
251 }; 247 };
252 248
253 } // namespace google_apis 249 } // namespace google_apis
254 250
255 #endif // CHROME_BROWSER_GOOGLE_APIS_BASE_OPERATIONS_H_ 251 #endif // CHROME_BROWSER_GOOGLE_APIS_BASE_OPERATIONS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/google_apis/base_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698