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

Side by Side Diff: Source/core/loader/appcache/ApplicationCacheHost.cpp

Issue 216523002: Oilpan: Replace most of RefPtrs for Event objects with oilpan's transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 dispatchDOMEvent(deferred.eventID, deferred.progressTotal, deferred.prog ressDone, deferred.errorReason, deferred.errorURL, deferred.errorStatus, deferre d.errorMessage); 209 dispatchDOMEvent(deferred.eventID, deferred.progressTotal, deferred.prog ressDone, deferred.errorReason, deferred.errorURL, deferred.errorStatus, deferre d.errorMessage);
210 } 210 }
211 m_deferredEvents.clear(); 211 m_deferredEvents.clear();
212 m_defersEvents = false; 212 m_defersEvents = false;
213 } 213 }
214 214
215 void ApplicationCacheHost::dispatchDOMEvent(EventID id, int progressTotal, int p rogressDone, blink::WebApplicationCacheHost::ErrorReason errorReason, const Stri ng& errorURL, int errorStatus, const String& errorMessage) 215 void ApplicationCacheHost::dispatchDOMEvent(EventID id, int progressTotal, int p rogressDone, blink::WebApplicationCacheHost::ErrorReason errorReason, const Stri ng& errorURL, int errorStatus, const String& errorMessage)
216 { 216 {
217 if (m_domApplicationCache) { 217 if (m_domApplicationCache) {
218 const AtomicString& eventType = ApplicationCache::toEventType(id); 218 const AtomicString& eventType = ApplicationCache::toEventType(id);
219 RefPtr<Event> event; 219 RefPtrWillBeRawPtr<Event> event = nullptr;
220 if (id == PROGRESS_EVENT) 220 if (id == PROGRESS_EVENT)
221 event = ProgressEvent::create(eventType, true, progressDone, progres sTotal); 221 event = ProgressEvent::create(eventType, true, progressDone, progres sTotal);
222 else if (id == ERROR_EVENT) 222 else if (id == ERROR_EVENT)
223 event = ApplicationCacheErrorEvent::create(errorReason, errorURL, er rorStatus, errorMessage); 223 event = ApplicationCacheErrorEvent::create(errorReason, errorURL, er rorStatus, errorMessage);
224 else 224 else
225 event = Event::create(eventType); 225 event = Event::create(eventType);
226 m_domApplicationCache->dispatchEvent(event, ASSERT_NO_EXCEPTION); 226 m_domApplicationCache->dispatchEvent(event, ASSERT_NO_EXCEPTION);
227 } 227 }
228 } 228 }
229 229
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 { 271 {
272 notifyApplicationCache(PROGRESS_EVENT, progressTotal, progressDone, blink::W ebApplicationCacheHost::UnknownError, String(), 0, String()); 272 notifyApplicationCache(PROGRESS_EVENT, progressTotal, progressDone, blink::W ebApplicationCacheHost::UnknownError, String(), 0, String());
273 } 273 }
274 274
275 void ApplicationCacheHost::notifyErrorEventListener(blink::WebApplicationCacheHo st::ErrorReason reason, const blink::WebURL& url, int status, const blink::WebSt ring& message) 275 void ApplicationCacheHost::notifyErrorEventListener(blink::WebApplicationCacheHo st::ErrorReason reason, const blink::WebURL& url, int status, const blink::WebSt ring& message)
276 { 276 {
277 notifyApplicationCache(ERROR_EVENT, 0, 0, reason, url.string(), status, mess age); 277 notifyApplicationCache(ERROR_EVENT, 0, 0, reason, url.string(), status, mess age);
278 } 278 }
279 279
280 } // namespace WebCore 280 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698