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

Side by Side Diff: third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp

Issue 2721603005: Convert unnecessary ContextLifecycleObservers into ContextClients. (Closed)
Patch Set: normalize trace method Created 3 years, 9 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return DOMFileSystem::create(context, filesystemName.toString(), 101 return DOMFileSystem::create(context, filesystemName.toString(),
102 FileSystemTypeIsolated, 102 FileSystemTypeIsolated,
103 KURL(ParsedURLString, rootURL.toString())); 103 KURL(ParsedURLString, rootURL.toString()));
104 } 104 }
105 105
106 DOMFileSystem::DOMFileSystem(ExecutionContext* context, 106 DOMFileSystem::DOMFileSystem(ExecutionContext* context,
107 const String& name, 107 const String& name,
108 FileSystemType type, 108 FileSystemType type,
109 const KURL& rootURL) 109 const KURL& rootURL)
110 : DOMFileSystemBase(context, name, type, rootURL), 110 : DOMFileSystemBase(context, name, type, rootURL),
111 ContextLifecycleObserver(context), 111 ContextClient(context),
112 m_numberOfPendingCallbacks(0), 112 m_numberOfPendingCallbacks(0),
113 m_rootEntry(DirectoryEntry::create(this, DOMFilePath::root)) {} 113 m_rootEntry(DirectoryEntry::create(this, DOMFilePath::root)) {}
114 114
115 DirectoryEntry* DOMFileSystem::root() const { 115 DirectoryEntry* DOMFileSystem::root() const {
116 return m_rootEntry.get(); 116 return m_rootEntry.get();
117 } 117 }
118 118
119 void DOMFileSystem::addPendingCallbacks() { 119 void DOMFileSystem::addPendingCallbacks() {
120 ++m_numberOfPendingCallbacks; 120 ++m_numberOfPendingCallbacks;
121 } 121 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 DCHECK(executionContext->isContextThread()); 210 DCHECK(executionContext->isContextThread());
211 InspectorInstrumentation::asyncTaskScheduled( 211 InspectorInstrumentation::asyncTaskScheduled(
212 executionContext, taskNameForInstrumentation(), task.get()); 212 executionContext, taskNameForInstrumentation(), task.get());
213 TaskRunnerHelper::get(TaskType::FileReading, executionContext) 213 TaskRunnerHelper::get(TaskType::FileReading, executionContext)
214 ->postTask(BLINK_FROM_HERE, 214 ->postTask(BLINK_FROM_HERE,
215 WTF::bind(&runCallback, wrapWeakPersistent(executionContext), 215 WTF::bind(&runCallback, wrapWeakPersistent(executionContext),
216 WTF::passed(std::move(task)))); 216 WTF::passed(std::move(task))));
217 } 217 }
218 218
219 DEFINE_TRACE(DOMFileSystem) { 219 DEFINE_TRACE(DOMFileSystem) {
220 visitor->trace(m_rootEntry);
220 DOMFileSystemBase::trace(visitor); 221 DOMFileSystemBase::trace(visitor);
221 ContextLifecycleObserver::trace(visitor); 222 ContextClient::trace(visitor);
222 visitor->trace(m_rootEntry);
223 } 223 }
224 224
225 } // namespace blink 225 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698