blob: 787e89d95dc01168e62a2113b5648036478d83d9 (
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
|
// 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.
#include "chrome/browser/google_apis/operation_util.h"
#include <string>
namespace google_apis {
namespace util {
namespace {
// etag matching header.
const char kIfMatchHeaderPrefix[] = "If-Match: ";
} // namespace
const char kIfMatchAllHeader[] = "If-Match: *";
std::string GenerateIfMatchHeader(const std::string& etag) {
return etag.empty() ? kIfMatchAllHeader : (kIfMatchHeaderPrefix + etag);
}
} // namespace util
} // namespace google_apis
|