Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: content/renderer/media/cache_util.h

Issue 18123002: Migrate webkit/renderer/media/ to content/renderer/media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: delegates Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 WEBKIT_RENDERER_MEDIA_CACHE_UTIL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_CACHE_UTIL_H_
6 #define WEBKIT_RENDERER_MEDIA_CACHE_UTIL_H_ 6 #define CONTENT_RENDERER_MEDIA_CACHE_UTIL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "content/common/content_export.h"
11 12
12 namespace WebKit { 13 namespace WebKit {
13 class WebURLResponse; 14 class WebURLResponse;
14 } 15 }
15 16
16 namespace webkit_media { 17 namespace content {
17 18
18 // Reasons that a cached WebURLResponse will *not* prevent a future request to 19 // Reasons that a cached WebURLResponse will *not* prevent a future request to
19 // the server. Reported via UMA, so don't change/reuse previously-existing 20 // the server. Reported via UMA, so don't change/reuse previously-existing
20 // values. 21 // values.
21 enum UncacheableReason { 22 enum UncacheableReason {
22 kNoData = 1 << 0, // Not 200 or 206. 23 kNoData = 1 << 0, // Not 200 or 206.
23 kPre11PartialResponse = 1 << 1, // 206 but HTTP version < 1.1. 24 kPre11PartialResponse = 1 << 1, // 206 but HTTP version < 1.1.
24 kNoStrongValidatorOnPartialResponse = 1 << 2, // 206, no strong validator. 25 kNoStrongValidatorOnPartialResponse = 1 << 2, // 206, no strong validator.
25 kShortMaxAge = 1 << 3, // Max age less than 1h (arbitrary value). 26 kShortMaxAge = 1 << 3, // Max age less than 1h (arbitrary value).
26 kExpiresTooSoon = 1 << 4, // Expires in less than 1h (arbitrary value). 27 kExpiresTooSoon = 1 << 4, // Expires in less than 1h (arbitrary value).
27 kHasMustRevalidate = 1 << 5, // Response asks for revalidation. 28 kHasMustRevalidate = 1 << 5, // Response asks for revalidation.
28 kNoCache = 1 << 6, // Response included a no-cache header. 29 kNoCache = 1 << 6, // Response included a no-cache header.
29 kNoStore = 1 << 7, // Response included a no-store header. 30 kNoStore = 1 << 7, // Response included a no-store header.
30 kMaxReason // Needs to be one more than max legitimate reason. 31 kMaxReason // Needs to be one more than max legitimate reason.
31 }; 32 };
32 33
33 // Return the logical OR of the reasons "response" cannot be used for a future 34 // Return the logical OR of the reasons "response" cannot be used for a future
34 // request (using the disk cache), or 0 if it might be useful. 35 // request (using the disk cache), or 0 if it might be useful.
35 uint32 GetReasonsForUncacheability(const WebKit::WebURLResponse& response); 36 uint32 CONTENT_EXPORT GetReasonsForUncacheability(
37 const WebKit::WebURLResponse& response);
36 38
37 } // namespace webkit_media 39 } // namespace content
38 40
39 #endif // WEBKIT_RENDERER_MEDIA_CACHE_UTIL_H_ 41 #endif // CONTENT_RENDERER_MEDIA_CACHE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698