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
3// found in the LICENSE file.
4
5#include "google_apis/drive/request_util.h"
6
7#include <string>
8
9namespace google_apis {
10namespace util {
11
12namespace {
13
14// etag matching header.
15const char kIfMatchHeaderPrefix[] = "If-Match: ";
16
17}  // namespace
18
19const char kIfMatchAllHeader[] = "If-Match: *";
20
21std::string GenerateIfMatchHeader(const std::string& etag) {
22  return etag.empty() ? kIfMatchAllHeader : (kIfMatchHeaderPrefix + etag);
23}
24
25}  // namespace util
26}  // namespace google_apis
27