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

Side by Side Diff: google_apis/drive/drive_api_requests.h

Issue 140513008: drive: Allow setting modified/accessed date with AddNewDirectory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_ 5 #ifndef GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_
6 #define GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_ 6 #define GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // See also https://developers.google.com/drive/manage-uploads and 133 // See also https://developers.google.com/drive/manage-uploads and
134 // https://developers.google.com/drive/folder 134 // https://developers.google.com/drive/folder
135 class FilesInsertRequest : public DriveApiDataRequest { 135 class FilesInsertRequest : public DriveApiDataRequest {
136 public: 136 public:
137 FilesInsertRequest(RequestSender* sender, 137 FilesInsertRequest(RequestSender* sender,
138 const DriveApiUrlGenerator& url_generator, 138 const DriveApiUrlGenerator& url_generator,
139 const FileResourceCallback& callback); 139 const FileResourceCallback& callback);
140 virtual ~FilesInsertRequest(); 140 virtual ~FilesInsertRequest();
141 141
142 // Optional request body. 142 // Optional request body.
143 const base::Time& last_viewed_by_me_date() const {
144 return last_viewed_by_me_date_;
145 }
146 void set_last_viewed_by_me_date(const base::Time& last_viewed_by_me_date) {
147 last_viewed_by_me_date_ = last_viewed_by_me_date;
148 }
149
143 const std::string& mime_type() const { return mime_type_; } 150 const std::string& mime_type() const { return mime_type_; }
144 void set_mime_type(const std::string& mime_type) { 151 void set_mime_type(const std::string& mime_type) {
145 mime_type_ = mime_type; 152 mime_type_ = mime_type;
146 } 153 }
147 154
155 const base::Time& modified_date() const { return modified_date_; }
156 void set_modified_date(const base::Time& modified_date) {
157 modified_date_ = modified_date;
158 }
159
148 const std::vector<std::string>& parents() const { return parents_; } 160 const std::vector<std::string>& parents() const { return parents_; }
149 void add_parent(const std::string& parent) { parents_.push_back(parent); } 161 void add_parent(const std::string& parent) { parents_.push_back(parent); }
150 162
151 const std::string& title() const { return title_; } 163 const std::string& title() const { return title_; }
152 void set_title(const std::string& title) { title_ = title; } 164 void set_title(const std::string& title) { title_ = title; }
153 165
154 protected: 166 protected:
155 // Overridden from GetDataRequest. 167 // Overridden from GetDataRequest.
156 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE; 168 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE;
157 virtual bool GetContentData(std::string* upload_content_type, 169 virtual bool GetContentData(std::string* upload_content_type,
158 std::string* upload_content) OVERRIDE; 170 std::string* upload_content) OVERRIDE;
159 171
160 // Overridden from DriveApiDataRequest. 172 // Overridden from DriveApiDataRequest.
161 virtual GURL GetURLInternal() const OVERRIDE; 173 virtual GURL GetURLInternal() const OVERRIDE;
162 174
163 private: 175 private:
164 const DriveApiUrlGenerator url_generator_; 176 const DriveApiUrlGenerator url_generator_;
165 177
178 base::Time last_viewed_by_me_date_;
166 std::string mime_type_; 179 std::string mime_type_;
180 base::Time modified_date_;
167 std::vector<std::string> parents_; 181 std::vector<std::string> parents_;
168 std::string title_; 182 std::string title_;
169 183
170 DISALLOW_COPY_AND_ASSIGN(FilesInsertRequest); 184 DISALLOW_COPY_AND_ASSIGN(FilesInsertRequest);
171 }; 185 };
172 186
173 //============================== FilesPatchRequest ============================ 187 //============================== FilesPatchRequest ============================
174 188
175 // This class performs the request for patching file metadata. 189 // This class performs the request for patching file metadata.
176 // This request is mapped to 190 // This request is mapped to
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 const ProgressCallback& progress_callback); 839 const ProgressCallback& progress_callback);
826 virtual ~DownloadFileRequest(); 840 virtual ~DownloadFileRequest();
827 841
828 DISALLOW_COPY_AND_ASSIGN(DownloadFileRequest); 842 DISALLOW_COPY_AND_ASSIGN(DownloadFileRequest);
829 }; 843 };
830 844
831 } // namespace drive 845 } // namespace drive
832 } // namespace google_apis 846 } // namespace google_apis
833 847
834 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_ 848 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend_v1/api_util.cc ('k') | google_apis/drive/drive_api_requests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698