summaryrefslogtreecommitdiff
path: root/chromium/google_apis/drive/request_util.h
blob: e688015c7e941110238783270f7b74a2b69443ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef GOOGLE_APIS_DRIVE_REQUEST_UTIL_H_
#define GOOGLE_APIS_DRIVE_REQUEST_UTIL_H_

#include <memory>
#include <string>

namespace base {
class DictionaryValue;
}

namespace google_apis {
namespace util {

// If-Match header which matches to all etags.
extern const char kIfMatchAllHeader[];
extern const char kContentTypeApplicationJson[];

// Returns If-Match header string for |etag|.
// If |etag| is empty, the returned header should match any etag.
std::string GenerateIfMatchHeader(const std::string& etag);

// Creates a Parent value which can be used as a part of request body.
std::unique_ptr<base::DictionaryValue> CreateParentValue(
    const std::string& file_id);

}  // namespace util
}  // namespace google_apis

#endif  // GOOGLE_APIS_DRIVE_REQUEST_UTIL_H_