OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_REQUEST_UTIL_H_ | 5 #ifndef GOOGLE_APIS_DRIVE_REQUEST_UTIL_H_ |
6 #define GOOGLE_APIS_DRIVE_REQUEST_UTIL_H_ | 6 #define GOOGLE_APIS_DRIVE_REQUEST_UTIL_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 #include "base/memory/scoped_ptr.h" | |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 class DictionaryValue; | 12 class DictionaryValue; |
13 } | 13 } |
14 | 14 |
15 namespace google_apis { | 15 namespace google_apis { |
16 namespace util { | 16 namespace util { |
17 | 17 |
18 // If-Match header which matches to all etags. | 18 // If-Match header which matches to all etags. |
19 extern const char kIfMatchAllHeader[]; | 19 extern const char kIfMatchAllHeader[]; |
20 extern const char kContentTypeApplicationJson[]; | 20 extern const char kContentTypeApplicationJson[]; |
21 | 21 |
22 // Returns If-Match header string for |etag|. | 22 // Returns If-Match header string for |etag|. |
23 // If |etag| is empty, the returned header should match any etag. | 23 // If |etag| is empty, the returned header should match any etag. |
24 std::string GenerateIfMatchHeader(const std::string& etag); | 24 std::string GenerateIfMatchHeader(const std::string& etag); |
25 | 25 |
26 // Creates a Parent value which can be used as a part of request body. | 26 // Creates a Parent value which can be used as a part of request body. |
27 scoped_ptr<base::DictionaryValue> CreateParentValue(const std::string& file_id); | 27 std::unique_ptr<base::DictionaryValue> CreateParentValue( |
| 28 const std::string& file_id); |
28 | 29 |
29 } // namespace util | 30 } // namespace util |
30 } // namespace google_apis | 31 } // namespace google_apis |
31 | 32 |
32 #endif // GOOGLE_APIS_DRIVE_REQUEST_UTIL_H_ | 33 #endif // GOOGLE_APIS_DRIVE_REQUEST_UTIL_H_ |
OLD | NEW |