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

Side by Side Diff: webkit/appcache/appcache_interfaces.cc

Issue 8396013: AppCache INTERCEPT namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/appcache/appcache_interfaces.h" 5 #include "webkit/appcache/appcache_interfaces.h"
6 6
7 #include "googleurl/src/gurl.h" 7 #include "googleurl/src/gurl.h"
8 #include "net/url_request/url_request.h" 8 #include "net/url_request/url_request.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebApplicationCacheHo st.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebApplicationCacheHo st.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
(...skipping 17 matching lines...) Expand all
28 size(0), 28 size(0),
29 is_complete(false) { 29 is_complete(false) {
30 } 30 }
31 31
32 AppCacheInfo::~AppCacheInfo() { 32 AppCacheInfo::~AppCacheInfo() {
33 } 33 }
34 34
35 AppCacheResourceInfo::AppCacheResourceInfo() 35 AppCacheResourceInfo::AppCacheResourceInfo()
36 : url(), 36 : url(),
37 size(0), 37 size(0),
38 is_master(0), 38 is_master(false),
39 is_manifest(0), 39 is_manifest(false),
40 is_fallback(0), 40 is_intercept(false),
41 is_foreign(0), 41 is_fallback(false),
42 is_explicit(0), 42 is_foreign(false),
43 is_explicit(false),
43 response_id(kNoResponseId) { 44 response_id(kNoResponseId) {
44 } 45 }
45 46
46 AppCacheResourceInfo::~AppCacheResourceInfo() { 47 AppCacheResourceInfo::~AppCacheResourceInfo() {
47 } 48 }
48 49
50 Namespace::Namespace()
51 : type(FALLBACK_NAMESPACE) {
52 }
53
54 Namespace::Namespace(NamespaceType type, const GURL& url, const GURL& target)
55 : type(type), namespace_url(url), target_url(target) {
56 }
57
58 Namespace::~Namespace() {
59 }
60
61
49 bool IsSchemeSupported(const GURL& url) { 62 bool IsSchemeSupported(const GURL& url) {
50 bool supported = url.SchemeIs(kHttpScheme) || url.SchemeIs(kHttpsScheme); 63 bool supported = url.SchemeIs(kHttpScheme) || url.SchemeIs(kHttpsScheme);
51 #ifndef NDEBUG 64 #ifndef NDEBUG
52 // TODO(michaeln): It would be really nice if this could optionally work for 65 // TODO(michaeln): It would be really nice if this could optionally work for
53 // file urls too to help web developers experiment and test their apps, 66 // file urls too to help web developers experiment and test their apps,
54 // perhaps enabled via a cmd line flag or some other developer tool setting. 67 // perhaps enabled via a cmd line flag or some other developer tool setting.
55 // Unfortunately file scheme net::URLRequest don't produce the same signalling 68 // Unfortunately file scheme net::URLRequest don't produce the same signalling
56 // (200 response codes, headers) as http URLRequests, so this doesn't work 69 // (200 response codes, headers) as http URLRequests, so this doesn't work
57 // just yet. 70 // just yet.
58 // supported |= url.SchemeIsFile(); 71 // supported |= url.SchemeIsFile();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 COMPILE_ASSERT((int)WebConsoleMessage::LevelTip == 115 COMPILE_ASSERT((int)WebConsoleMessage::LevelTip ==
103 (int)LOG_TIP, LevelTip); 116 (int)LOG_TIP, LevelTip);
104 COMPILE_ASSERT((int)WebConsoleMessage::LevelLog == 117 COMPILE_ASSERT((int)WebConsoleMessage::LevelLog ==
105 (int)LOG_INFO, LevelLog); 118 (int)LOG_INFO, LevelLog);
106 COMPILE_ASSERT((int)WebConsoleMessage::LevelWarning == 119 COMPILE_ASSERT((int)WebConsoleMessage::LevelWarning ==
107 (int)LOG_WARNING, LevelWarning); 120 (int)LOG_WARNING, LevelWarning);
108 COMPILE_ASSERT((int)WebConsoleMessage::LevelError == 121 COMPILE_ASSERT((int)WebConsoleMessage::LevelError ==
109 (int)LOG_ERROR, LevelError); 122 (int)LOG_ERROR, LevelError);
110 123
111 } // namespace appcache 124 } // namespace appcache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698