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 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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // Child response embedded in multipart parent response. | 75 // Child response embedded in multipart parent response. |
76 struct MultipartHttpResponse { | 76 struct MultipartHttpResponse { |
77 MultipartHttpResponse(); | 77 MultipartHttpResponse(); |
78 ~MultipartHttpResponse(); | 78 ~MultipartHttpResponse(); |
79 DriveApiErrorCode code; | 79 DriveApiErrorCode code; |
80 std::string body; | 80 std::string body; |
81 }; | 81 }; |
82 | 82 |
83 // Splits multipart |response| into |parts|. Each part must be HTTP sub-response | 83 // Splits multipart |response| into |parts|. Each part must be HTTP sub-response |
84 // of drive batch request. |content_type| is a value of Content-Type response | 84 // of drive batch request. |content_type| is a value of Content-Type response |
85 // header. Returns true on succcess. | 85 // header. Returns true on success. |
86 bool ParseMultipartResponse(const std::string& content_type, | 86 bool ParseMultipartResponse(const std::string& content_type, |
87 const std::string& response, | 87 const std::string& response, |
88 std::vector<MultipartHttpResponse>* parts); | 88 std::vector<MultipartHttpResponse>* parts); |
89 | 89 |
90 //============================ DriveApiPartialFieldRequest ==================== | 90 //============================ DriveApiPartialFieldRequest ==================== |
91 | 91 |
92 // This is base class of the Drive API related requests. All Drive API requests | 92 // This is base class of the Drive API related requests. All Drive API requests |
93 // support partial request (to improve the performance). The function can be | 93 // support partial request (to improve the performance). The function can be |
94 // shared among the Drive API requests. | 94 // shared among the Drive API requests. |
95 // See also https://developers.google.com/drive/performance | 95 // See also https://developers.google.com/drive/performance |
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 // invalidate its weak pointers before any other members are destroyed. | 1258 // invalidate its weak pointers before any other members are destroyed. |
1259 base::WeakPtrFactory<BatchUploadRequest> weak_ptr_factory_; | 1259 base::WeakPtrFactory<BatchUploadRequest> weak_ptr_factory_; |
1260 | 1260 |
1261 DISALLOW_COPY_AND_ASSIGN(BatchUploadRequest); | 1261 DISALLOW_COPY_AND_ASSIGN(BatchUploadRequest); |
1262 }; | 1262 }; |
1263 | 1263 |
1264 } // namespace drive | 1264 } // namespace drive |
1265 } // namespace google_apis | 1265 } // namespace google_apis |
1266 | 1266 |
1267 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_ | 1267 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_ |
OLD | NEW |