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

Unified Diff: chrome/browser/sync_file_system/sync_file_system_service.cc

Issue 188293005: [SyncFS] Add UMAs to track syncfs usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « chrome/browser/sync_file_system/remote_file_sync_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/sync_file_system_service.cc
diff --git a/chrome/browser/sync_file_system/sync_file_system_service.cc b/chrome/browser/sync_file_system/sync_file_system_service.cc
index f0be2b0b24e7f19ef39273799f14639036790952..ecce07df39328751c54006d6c913a0f16f569a38 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_service.cc
@@ -10,6 +10,7 @@
#include "base/format_macros.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
+#include "base/metrics/histogram.h"
#include "base/stl_util.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.h"
@@ -61,6 +62,8 @@ SyncServiceState RemoteStateToSyncServiceState(
return SYNC_SERVICE_AUTHENTICATION_REQUIRED;
case REMOTE_SERVICE_DISABLED:
return SYNC_SERVICE_DISABLED;
+ case REMOTE_SERVICE_STATE_MAX:
+ NOTREACHED();
}
NOTREACHED() << "Unknown remote service state: " << state;
return SYNC_SERVICE_DISABLED;
@@ -389,6 +392,8 @@ ConflictResolutionPolicy SyncFileSystemService::GetConflictResolutionPolicy(
SyncStatusCode SyncFileSystemService::SetConflictResolutionPolicy(
const GURL& origin,
ConflictResolutionPolicy policy) {
+ UMA_HISTOGRAM_ENUMERATION("SyncFileSystem.ConflictResolutionPolicy",
+ policy, CONFLICT_RESOLUTION_POLICY_MAX);
return GetRemoteService(origin)->SetConflictResolutionPolicy(origin, policy);
}
@@ -475,6 +480,10 @@ void SyncFileSystemService::DidRegisterOrigin(
app_origin.spec().c_str(),
SyncStatusCodeToString(status));
+ UMA_HISTOGRAM_ENUMERATION("SyncFileSystem.RegisterOriginResult",
+ GetRemoteService(app_origin)->GetCurrentState(),
+ REMOTE_SERVICE_STATE_MAX);
+
if (status == SYNC_STATUS_FAILED) {
// If we got generic error return the service status information.
switch (GetRemoteService(app_origin)->GetCurrentState()) {
« no previous file with comments | « chrome/browser/sync_file_system/remote_file_sync_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698