public AppCacheHost::Observer,
public AppCacheService::Observer {
public:
+ // Used for uma stats only for now, so new values are append only.
+ enum ResultType {
+ UPDATE_OK, DB_ERROR, DISKCACHE_ERROR, QUOTA_ERROR, REDIRECT_ERROR,
+ MANIFEST_ERROR, NETWORK_ERROR, SERVER_ERROR,
+ NUM_UPDATE_JOB_RESULT_TYPES
+ };
+
AppCacheUpdateJob(AppCacheService* service, AppCacheGroup* group);
virtual ~AppCacheUpdateJob();
void set_existing_entry(const AppCacheEntry& entry) {
existing_entry_ = entry;
}
+ ResultType result() const { return result_; }
private:
// URLRequest::Delegate overrides
AppCacheEntry existing_entry_;
scoped_refptr<net::HttpResponseHeaders> existing_response_headers_;
std::string manifest_data_;
+ ResultType result_;
scoped_ptr<AppCacheResponseWriter> response_writer_;
}; // class URLFetcher
virtual void OnServiceReinitialized(
AppCacheStorageReference* old_storage) OVERRIDE;
- void HandleCacheFailure(const std::string& error_message);
+ void HandleCacheFailure(const std::string& error_message, ResultType result);
void FetchManifest(bool is_first_fetch);
void HandleManifestFetchCompleted(URLFetcher* fetcher);