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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_operations.cc

Issue 10855034: Drive: Remove gdata_params.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix reviews (#12) and Rebase Created 8 years, 4 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 #include "chrome/browser/chromeos/gdata/gdata_operations.h" 5 #include "chrome/browser/chromeos/gdata/gdata_operations.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/gdata/gdata_util.h" 10 #include "chrome/browser/chromeos/gdata/gdata_util.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 return GURL(base::StringPrintf(kGetDocumentListURLForDirectoryFormat, 153 return GURL(base::StringPrintf(kGetDocumentListURLForDirectoryFormat,
154 net::EscapePath( 154 net::EscapePath(
155 directory_resource_id).c_str())); 155 directory_resource_id).c_str()));
156 } 156 }
157 157
158 } // namespace 158 } // namespace
159 159
160 namespace gdata { 160 namespace gdata {
161 161
162 //============================ Structs ===========================
163
164 ResumeUploadResponse::ResumeUploadResponse(GDataErrorCode code,
165 int64 start_range_received,
166 int64 end_range_received)
167 : code(code),
168 start_range_received(start_range_received),
169 end_range_received(end_range_received) {
170 }
171
172 ResumeUploadResponse::~ResumeUploadResponse() {
173 }
174
175 InitiateUploadParams::InitiateUploadParams(
176 UploadMode upload_mode,
177 const std::string& title,
178 const std::string& content_type,
179 int64 content_length,
180 const GURL& upload_location,
181 const FilePath& virtual_path)
182 : upload_mode(upload_mode),
183 title(title),
184 content_type(content_type),
185 content_length(content_length),
186 upload_location(upload_location),
187 virtual_path(virtual_path) {
188 }
189
190 InitiateUploadParams::~InitiateUploadParams() {
191 }
192
193 ResumeUploadParams::ResumeUploadParams(
194 UploadMode upload_mode,
195 int64 start_range,
196 int64 end_range,
197 int64 content_length,
198 const std::string& content_type,
199 scoped_refptr<net::IOBuffer> buf,
200 const GURL& upload_location,
201 const FilePath& virtual_path) : upload_mode(upload_mode),
202 start_range(start_range),
203 end_range(end_range),
204 content_length(content_length),
205 content_type(content_type),
206 buf(buf),
207 upload_location(upload_location),
208 virtual_path(virtual_path) {
209 }
210
211 ResumeUploadParams::~ResumeUploadParams() {
212 }
213
162 //============================ GetDocumentsOperation =========================== 214 //============================ GetDocumentsOperation ===========================
163 215
164 GetDocumentsOperation::GetDocumentsOperation( 216 GetDocumentsOperation::GetDocumentsOperation(
165 GDataOperationRegistry* registry, 217 GDataOperationRegistry* registry,
166 const GURL& url, 218 const GURL& url,
167 int start_changestamp, 219 int start_changestamp,
168 const std::string& search_string, 220 const std::string& search_string,
169 const std::string& directory_resource_id, 221 const std::string& directory_resource_id,
170 const GetDataCallback& callback) 222 const GetDataCallback& callback)
171 : GetDataOperation(registry, callback), 223 : GetDataOperation(registry, callback),
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 OnProcessURLFetchResultsComplete(code == HTTP_SUCCESS); 1008 OnProcessURLFetchResultsComplete(code == HTTP_SUCCESS);
957 } 1009 }
958 1010
959 void GetContactPhotoOperation::RunCallbackOnPrematureFailure( 1011 void GetContactPhotoOperation::RunCallbackOnPrematureFailure(
960 GDataErrorCode code) { 1012 GDataErrorCode code) {
961 scoped_ptr<std::string> data(new std::string); 1013 scoped_ptr<std::string> data(new std::string);
962 callback_.Run(code, data.Pass()); 1014 callback_.Run(code, data.Pass());
963 } 1015 }
964 1016
965 } // namespace gdata 1017 } // namespace gdata
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698