Title: [125677] trunk/Source/WebCore
Revision
125677
Author
[email protected]
Date
2012-08-15 08:56:28 -0700 (Wed, 15 Aug 2012)

Log Message

Web Inspector: Use default parameter on reportResult in InspectorFileSystemAgent
https://bugs.webkit.org/show_bug.cgi?id=93930

Patch by Taiju Tsuiki <[email protected]> on 2012-08-15
Reviewed by Vsevolod Vlasov.

No functional change.

* inspector/InspectorFileSystemAgent.cpp:
(WebCore):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125676 => 125677)


--- trunk/Source/WebCore/ChangeLog	2012-08-15 15:50:04 UTC (rev 125676)
+++ trunk/Source/WebCore/ChangeLog	2012-08-15 15:56:28 UTC (rev 125677)
@@ -1,3 +1,15 @@
+2012-08-15  Taiju Tsuiki  <[email protected]>
+
+        Web Inspector: Use default parameter on reportResult in InspectorFileSystemAgent
+        https://bugs.webkit.org/show_bug.cgi?id=93930
+
+        Reviewed by Vsevolod Vlasov.
+
+        No functional change.
+
+        * inspector/InspectorFileSystemAgent.cpp:
+        (WebCore):
+
 2012-08-15  Vsevolod Vlasov  <[email protected]>
 
         Web Inspector: TabbedEditorContainer Doens't show '*' near modified file name sometimes.

Modified: trunk/Source/WebCore/inspector/InspectorFileSystemAgent.cpp (125676 => 125677)


--- trunk/Source/WebCore/inspector/InspectorFileSystemAgent.cpp	2012-08-15 15:50:04 UTC (rev 125676)
+++ trunk/Source/WebCore/inspector/InspectorFileSystemAgent.cpp	2012-08-15 15:56:28 UTC (rev 125677)
@@ -155,7 +155,7 @@
     bool didHitError(FileError*);
     bool didGetEntry(Entry*);
 
-    void reportResult(FileError::ErrorCode errorCode, PassRefPtr<TypeBuilder::FileSystem::Entry> entry)
+    void reportResult(FileError::ErrorCode errorCode, PassRefPtr<TypeBuilder::FileSystem::Entry> entry = 0)
     {
         if (!m_frontendProvider || !m_frontendProvider->frontend())
             return;
@@ -175,7 +175,7 @@
 
 bool FileSystemRootRequest::didHitError(FileError* error)
 {
-    reportResult(error->code(), 0);
+    reportResult(error->code());
     return true;
 }
 
@@ -208,7 +208,7 @@
 
     virtual ~DirectoryContentRequest()
     {
-        reportResult(FileError::ABORT_ERR, 0);
+        reportResult(FileError::ABORT_ERR);
     }
 
     void start(ScriptExecutionContext*);
@@ -216,14 +216,14 @@
 private:
     bool didHitError(FileError* error)
     {
-        reportResult(error->code(), 0);
+        reportResult(error->code());
         return true;
     }
 
     bool didGetEntry(Entry*);
     bool didReadDirectoryEntries(EntryArray*);
 
-    void reportResult(FileError::ErrorCode errorCode, PassRefPtr<Array<TypeBuilder::FileSystem::Entry> > entries)
+    void reportResult(FileError::ErrorCode errorCode, PassRefPtr<Array<TypeBuilder::FileSystem::Entry> > entries = 0)
     {
         if (!m_frontendProvider || !m_frontendProvider->frontend())
             return;
@@ -252,7 +252,7 @@
     FileSystemType type;
     String path;
     if (!DOMFileSystemBase::crackFileSystemURL(m_url, type, path)) {
-        reportResult(FileError::SYNTAX_ERR, 0);
+        reportResult(FileError::SYNTAX_ERR);
         return;
     }
 
@@ -266,7 +266,7 @@
 bool DirectoryContentRequest::didGetEntry(Entry* entry)
 {
     if (!entry->isDirectory()) {
-        reportResult(FileError::TYPE_MISMATCH_ERR, 0);
+        reportResult(FileError::TYPE_MISMATCH_ERR);
         return true;
     }
 
@@ -279,7 +279,7 @@
 void DirectoryContentRequest::readDirectoryEntries()
 {
     if (!m_directoryReader->filesystem()->scriptExecutionContext()) {
-        reportResult(FileError::ABORT_ERR, 0);
+        reportResult(FileError::ABORT_ERR);
         return;
     }
 
@@ -340,20 +340,22 @@
 
     virtual ~MetadataRequest()
     {
-        reportResult(FileError::ABORT_ERR, 0);
+        reportResult(FileError::ABORT_ERR);
     }
 
+    void start(ScriptExecutionContext*);
+
+private:
     bool didHitError(FileError* error)
     {
-        reportResult(error->code(), 0);
+        reportResult(error->code());
         return true;
     }
 
-    void start(ScriptExecutionContext*);
     bool didGetEntry(Entry*);
     bool didGetMetadata(Metadata*);
 
-    void reportResult(FileError::ErrorCode errorCode, PassRefPtr<TypeBuilder::FileSystem::Metadata> metadata)
+    void reportResult(FileError::ErrorCode errorCode, PassRefPtr<TypeBuilder::FileSystem::Metadata> metadata = 0)
     {
         if (!m_frontendProvider || !m_frontendProvider->frontend())
             return;
@@ -361,7 +363,6 @@
         m_frontendProvider = 0;
     }
 
-private:
     MetadataRequest(PassRefPtr<FrontendProvider> frontendProvider, int requestId, const String& url)
         : m_frontendProvider(frontendProvider)
         , m_requestId(requestId)
@@ -389,7 +390,7 @@
 bool MetadataRequest::didGetEntry(Entry* entry)
 {
     if (!entry->filesystem()->scriptExecutionContext()) {
-        reportResult(FileError::ABORT_ERR, 0);
+        reportResult(FileError::ABORT_ERR);
         return true;
     }
 
@@ -420,12 +421,11 @@
 
     virtual ~FileContentRequest()
     {
-        reportResult(FileError::ABORT_ERR, 0, 0);
+        reportResult(FileError::ABORT_ERR);
     }
 
     void start(ScriptExecutionContext*);
 
-
     virtual bool operator==(const EventListener& other) OVERRIDE
     {
         return this == &other;
@@ -442,7 +442,7 @@
 private:
     bool didHitError(FileError* error)
     {
-        reportResult(error->code(), 0, 0);
+        reportResult(error->code());
         return true;
     }
 
@@ -450,7 +450,7 @@
     bool didGetFile(File*);
     void didRead();
 
-    void reportResult(FileError::ErrorCode errorCode, const String* result, const String* charset)
+    void reportResult(FileError::ErrorCode errorCode, const String* result = 0, const String* charset = 0)
     {
         if (!m_frontendProvider || !m_frontendProvider->frontend())
             return;
@@ -487,7 +487,7 @@
     FileSystemType type;
     String path;
     if (!DOMFileSystemBase::crackFileSystemURL(m_url, type, path)) {
-        reportResult(FileError::SYNTAX_ERR, 0, 0);
+        reportResult(FileError::SYNTAX_ERR);
         return;
     }
 
@@ -501,12 +501,12 @@
 bool FileContentRequest::didGetEntry(Entry* entry)
 {
     if (entry->isDirectory()) {
-        reportResult(FileError::TYPE_MISMATCH_ERR, 0, 0);
+        reportResult(FileError::TYPE_MISMATCH_ERR);
         return true;
     }
 
     if (!entry->filesystem()->scriptExecutionContext()) {
-        reportResult(FileError::ABORT_ERR, 0, 0);
+        reportResult(FileError::ABORT_ERR);
         return true;
     }
 
@@ -548,7 +548,7 @@
     reportResult(static_cast<FileError::ErrorCode>(0), &result, &m_charset);
 }
 
-}
+} // anonymous namespace
 
 // static
 PassOwnPtr<InspectorFileSystemAgent> InspectorFileSystemAgent::create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorState* state)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to