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

Unified Diff: Source/core/inspector/InspectorFileSystemAgent.cpp

Issue 22436002: Replace EntryArray type by an Entry[] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.py ('k') | Source/modules/filesystem/DOMFileSystem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorFileSystemAgent.cpp
diff --git a/Source/core/inspector/InspectorFileSystemAgent.cpp b/Source/core/inspector/InspectorFileSystemAgent.cpp
index 15add738fac44024dffb14cb41fd73dcdff2c3ca..6a75eee5d8fdca62e3682db40aa02bc9a944009f 100644
--- a/Source/core/inspector/InspectorFileSystemAgent.cpp
+++ b/Source/core/inspector/InspectorFileSystemAgent.cpp
@@ -48,7 +48,7 @@
#include "modules/filesystem/DirectoryEntry.h"
#include "modules/filesystem/DirectoryReader.h"
#include "modules/filesystem/EntriesCallback.h"
-#include "modules/filesystem/EntryArray.h"
+#include "modules/filesystem/Entry.h"
#include "modules/filesystem/EntryCallback.h"
#include "modules/filesystem/ErrorCallback.h"
#include "modules/filesystem/FileCallback.h"
@@ -82,14 +82,14 @@ namespace {
template<typename BaseCallback, typename Handler, typename Argument>
class CallbackDispatcher : public BaseCallback {
public:
- typedef bool (Handler::*HandlingMethod)(Argument*);
+ typedef bool (Handler::*HandlingMethod)(Argument);
static PassRefPtr<CallbackDispatcher> create(PassRefPtr<Handler> handler, HandlingMethod handlingMethod)
{
return adoptRef(new CallbackDispatcher(handler, handlingMethod));
}
- virtual bool handleEvent(Argument* argument) OVERRIDE
+ virtual bool handleEvent(Argument argument) OVERRIDE
{
return (m_handler.get()->*m_handlingMethod)(argument);
}
@@ -107,7 +107,7 @@ template<typename BaseCallback>
class CallbackDispatcherFactory {
public:
template<typename Handler, typename Argument>
- static PassRefPtr<CallbackDispatcher<BaseCallback, Handler, Argument> > create(Handler* handler, bool (Handler::*handlingMethod)(Argument*))
+ static PassRefPtr<CallbackDispatcher<BaseCallback, Handler, Argument> > create(Handler* handler, bool (Handler::*handlingMethod)(Argument))
{
return CallbackDispatcher<BaseCallback, Handler, Argument>::create(PassRefPtr<Handler>(handler), handlingMethod);
}
@@ -199,7 +199,7 @@ private:
}
bool didGetEntry(Entry*);
- bool didReadDirectoryEntries(EntryArray*);
+ bool didReadDirectoryEntries(const EntryVector&);
void reportResult(FileError::ErrorCode errorCode, PassRefPtr<Array<TypeBuilder::FileSystem::Entry> > entries = 0)
{
@@ -261,15 +261,15 @@ void DirectoryContentRequest::readDirectoryEntries()
m_directoryReader->readEntries(successCallback, errorCallback);
}
-bool DirectoryContentRequest::didReadDirectoryEntries(EntryArray* entries)
+bool DirectoryContentRequest::didReadDirectoryEntries(const EntryVector& entries)
{
- if (!entries->length()) {
+ if (entries.isEmpty()) {
reportResult(static_cast<FileError::ErrorCode>(0), m_entries);
return true;
}
- for (unsigned i = 0; i < entries->length(); ++i) {
- Entry* entry = entries->item(i);
+ for (size_t i = 0; i < entries.size(); ++i) {
+ RefPtr<Entry> entry = entries[i];
RefPtr<TypeBuilder::FileSystem::Entry> entryForFrontend = TypeBuilder::FileSystem::Entry::create()
.setUrl(entry->toURL())
.setName(entry->name())
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.py ('k') | Source/modules/filesystem/DOMFileSystem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698