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