Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / webkit / browser / appcache / appcache_response.h
index 610bdf4..d9695b3 100644 (file)
@@ -19,6 +19,10 @@ namespace net {
 class IOBuffer;
 }
 
+namespace content {
+class MockAppCacheStorage;
+}
+
 namespace appcache {
 
 class AppCacheStorage;
@@ -63,7 +67,7 @@ struct WEBKIT_STORAGE_BROWSER_EXPORT HttpResponseInfoIOBuffer
   HttpResponseInfoIOBuffer();
   explicit HttpResponseInfoIOBuffer(net::HttpResponseInfo* info);
 
- private:
+ protected:
   friend class base::RefCountedThreadSafe<HttpResponseInfoIOBuffer>;
   virtual ~HttpResponseInfoIOBuffer();
 };
@@ -170,9 +174,9 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheResponseReader
 
  protected:
   friend class AppCacheStorageImpl;
-  friend class MockAppCacheStorage;
+  friend class content::MockAppCacheStorage;
 
-  // Should only be constructed by the storage class.
+  // Should only be constructed by the storage class and derivatives.
   AppCacheResponseReader(int64 response_id,
                          int64 group_id,
                          AppCacheDiskCacheInterface* disk_cache);
@@ -226,9 +230,15 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheResponseWriter
   // Returns the amount written, info and data.
   int64 amount_written() { return info_size_ + write_position_; }
 
+ protected:
+  // Should only be constructed by the storage class and derivatives.
+  AppCacheResponseWriter(int64 response_id,
+                         int64 group_id,
+                         AppCacheDiskCacheInterface* disk_cache);
+
  private:
   friend class AppCacheStorageImpl;
-  friend class MockAppCacheStorage;
+  friend class content::MockAppCacheStorage;
 
   enum CreationPhase {
     NO_ATTEMPT,
@@ -237,11 +247,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheResponseWriter
     SECOND_ATTEMPT
   };
 
-  // Should only be constructed by the storage class.
-  AppCacheResponseWriter(int64 response_id,
-                         int64 group_id,
-                         AppCacheDiskCacheInterface* disk_cache);
-
   virtual void OnIOComplete(int result) OVERRIDE;
   void ContinueWriteInfo();
   void ContinueWriteData();