#ifndef CHROME_RENDERER_NET_ERROR_CACHE_LOAD_H_
#define CHROME_RENDERER_NET_ERROR_CACHE_LOAD_H_
#include "base/basictypes.h"
#include "content/public/renderer/render_frame_observer.h"
#include "gin/wrappable.h"
#include "url/gurl.h"
class GURL;
namespace content {
class RenderFrame;
}
class ErrorCacheLoad : public gin::Wrappable<ErrorCacheLoad>,
public content::RenderFrameObserver {
public:
static gin::WrapperInfo kWrapperInfo;
static void Install(content::RenderFrame* render_frame, const GURL& page_url);
private:
ErrorCacheLoad(content::RenderFrame* render_frame, const GURL& page_url);
virtual ~ErrorCacheLoad();
bool ReloadStaleInstance();
virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
v8::Isolate* isolate) OVERRIDE;
virtual void OnDestruct() OVERRIDE;
content::RenderFrame* render_frame_;
const GURL page_url_;
bool render_frame_destroyed_;
DISALLOW_COPY_AND_ASSIGN(ErrorCacheLoad);
};
#endif