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

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

Issue 12090015: Implement CreateDirectoryOperation on Drive API v2. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add an empty line. Created 7 years, 10 months 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 | « no previous file | chrome/browser/google_apis/drive_api_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_DRIVE_API_OPERATIONS_H_ 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_
6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_ 6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/google_apis/base_operations.h" 10 #include "chrome/browser/google_apis/base_operations.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Overridden from GetDataOperation. 131 // Overridden from GetDataOperation.
132 virtual GURL GetURL() const OVERRIDE; 132 virtual GURL GetURL() const OVERRIDE;
133 133
134 private: 134 private:
135 const DriveApiUrlGenerator url_generator_; 135 const DriveApiUrlGenerator url_generator_;
136 std::string file_id_; 136 std::string file_id_;
137 137
138 DISALLOW_COPY_AND_ASSIGN(GetFileOperation); 138 DISALLOW_COPY_AND_ASSIGN(GetFileOperation);
139 }; 139 };
140 140
141 // This namespace is introduced to avoid class name confliction between
142 // the operations for Drive API v2 and GData WAPI for transition.
143 // And, when the migration is done and GData WAPI's code is cleaned up,
144 // classes inside this namespace should be moved to the google_apis namespace.
145 // TODO(hidehiko): Get rid of this namespace after the migration.
146 namespace drive {
147
148 //========================== CreateDirectoryOperation ==========================
149
150 // This class performs the operation for creating a directory.
151 class CreateDirectoryOperation : public GetDataOperation {
152 public:
153 CreateDirectoryOperation(
154 OperationRegistry* registry,
155 net::URLRequestContextGetter* url_request_context_getter,
156 const DriveApiUrlGenerator& url_generator,
157 const std::string& parent_resource_id,
158 const std::string& directory_name,
159 const GetDataCallback& callback);
160 virtual ~CreateDirectoryOperation();
161
162 protected:
163 // Overridden from GetDataOperation.
164 virtual GURL GetURL() const OVERRIDE;
165 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE;
166 virtual bool GetContentData(std::string* upload_content_type,
167 std::string* upload_content) OVERRIDE;
168
169 private:
170 const DriveApiUrlGenerator url_generator_;
171 const std::string parent_resource_id_;
172 const std::string directory_name_;
173
174 DISALLOW_COPY_AND_ASSIGN(CreateDirectoryOperation);
175 };
176
177 } // namespace drive
141 } // namespace google_apis 178 } // namespace google_apis
142 179
143 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_ 180 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/google_apis/drive_api_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698