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

Unified Diff: webkit/browser/appcache/appcache_update_job.h

Issue 165613002: Add UMA stats for AppCacheUpdateJob results. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
Index: webkit/browser/appcache/appcache_update_job.h
diff --git a/webkit/browser/appcache/appcache_update_job.h b/webkit/browser/appcache/appcache_update_job.h
index 0b88be649e845d56fd54698962b1c87efb918b2c..3207fad34e98b9399f8b183bbe4502ece9f86ac1 100644
--- a/webkit/browser/appcache/appcache_update_job.h
+++ b/webkit/browser/appcache/appcache_update_job.h
@@ -35,6 +35,13 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheUpdateJob
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();
@@ -118,6 +125,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheUpdateJob
void set_existing_entry(const AppCacheEntry& entry) {
existing_entry_ = entry;
}
+ ResultType result() const { return result_; }
private:
// URLRequest::Delegate overrides
@@ -144,6 +152,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheUpdateJob
AppCacheEntry existing_entry_;
scoped_refptr<net::HttpResponseHeaders> existing_response_headers_;
std::string manifest_data_;
+ ResultType result_;
scoped_ptr<AppCacheResponseWriter> response_writer_;
}; // class URLFetcher
@@ -166,7 +175,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheUpdateJob
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);

Powered by Google App Engine
This is Rietveld 408576698