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

Side by Side Diff: third_party/WebKit/Source/core/loader/appcache/ApplicationCache.cpp

Issue 2415373002: Loading: bulk style errors fix in core/loader (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 recordAPIUseType(); 66 recordAPIUseType();
67 ApplicationCacheHost* cacheHost = applicationCacheHost(); 67 ApplicationCacheHost* cacheHost = applicationCacheHost();
68 if (!cacheHost) 68 if (!cacheHost)
69 return ApplicationCacheHost::kUncached; 69 return ApplicationCacheHost::kUncached;
70 return cacheHost->getStatus(); 70 return cacheHost->getStatus();
71 } 71 }
72 72
73 void ApplicationCache::update(ExceptionState& exceptionState) { 73 void ApplicationCache::update(ExceptionState& exceptionState) {
74 recordAPIUseType(); 74 recordAPIUseType();
75 ApplicationCacheHost* cacheHost = applicationCacheHost(); 75 ApplicationCacheHost* cacheHost = applicationCacheHost();
76 if (!cacheHost || !cacheHost->update()) 76 if (!cacheHost || !cacheHost->update()) {
77 exceptionState.throwDOMException( 77 exceptionState.throwDOMException(
78 InvalidStateError, "there is no application cache to update."); 78 InvalidStateError, "there is no application cache to update.");
79 }
79 } 80 }
80 81
81 void ApplicationCache::swapCache(ExceptionState& exceptionState) { 82 void ApplicationCache::swapCache(ExceptionState& exceptionState) {
82 recordAPIUseType(); 83 recordAPIUseType();
83 ApplicationCacheHost* cacheHost = applicationCacheHost(); 84 ApplicationCacheHost* cacheHost = applicationCacheHost();
84 if (!cacheHost || !cacheHost->swapCache()) 85 if (!cacheHost || !cacheHost->swapCache()) {
85 exceptionState.throwDOMException( 86 exceptionState.throwDOMException(
86 InvalidStateError, "there is no newer application cache to swap to."); 87 InvalidStateError, "there is no newer application cache to swap to.");
88 }
87 } 89 }
88 90
89 void ApplicationCache::abort() { 91 void ApplicationCache::abort() {
90 ApplicationCacheHost* cacheHost = applicationCacheHost(); 92 ApplicationCacheHost* cacheHost = applicationCacheHost();
91 if (cacheHost) 93 if (cacheHost)
92 cacheHost->abort(); 94 cacheHost->abort();
93 } 95 }
94 96
95 const AtomicString& ApplicationCache::interfaceName() const { 97 const AtomicString& ApplicationCache::interfaceName() const {
96 return EventTargetNames::ApplicationCache; 98 return EventTargetNames::ApplicationCache;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } else { 142 } else {
141 Deprecation::countDeprecation( 143 Deprecation::countDeprecation(
142 document, UseCounter::ApplicationCacheAPIInsecureOrigin); 144 document, UseCounter::ApplicationCacheAPIInsecureOrigin);
143 HostsUsingFeatures::countAnyWorld( 145 HostsUsingFeatures::countAnyWorld(
144 *document, 146 *document,
145 HostsUsingFeatures::Feature::ApplicationCacheAPIInsecureHost); 147 HostsUsingFeatures::Feature::ApplicationCacheAPIInsecureHost);
146 } 148 }
147 } 149 }
148 150
149 } // namespace blink 151 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698