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

Unified Diff: chrome/browser/chromeos/drive/drive_system_service.cc

Issue 11365249: drive: Event logger for chrome:drive-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix (#5) Created 8 years, 1 month 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/chromeos/drive/drive_system_service.h ('k') | chrome/browser/chromeos/drive/event_logger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/drive_system_service.cc
diff --git a/chrome/browser/chromeos/drive/drive_system_service.cc b/chrome/browser/chromeos/drive/drive_system_service.cc
index 5607d21222a802bffa58dc244b41738d07a30a02..f5934dfbc78d30853f820d41d8c1078c9cba8834 100644
--- a/chrome/browser/chromeos/drive/drive_system_service.cc
+++ b/chrome/browser/chromeos/drive/drive_system_service.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/chromeos/drive/drive_prefetcher.h"
#include "chrome/browser/chromeos/drive/drive_sync_client.h"
#include "chrome/browser/chromeos/drive/drive_webapps_registry.h"
+#include "chrome/browser/chromeos/drive/event_logger.h"
#include "chrome/browser/chromeos/drive/file_write_helper.h"
#include "chrome/browser/chromeos/drive/stale_cache_files_remover.h"
#include "chrome/browser/download/download_service.h"
@@ -41,6 +42,8 @@ using content::BrowserThread;
namespace drive {
namespace {
+static const size_t kEventLogHistorySize = 100;
+
// Used in test to setup system service.
google_apis::DriveServiceInterface* g_test_drive_service = NULL;
const std::string* g_test_cache_root = NULL;
@@ -88,6 +91,7 @@ void DriveSystemService::Initialize(
const FilePath& cache_root) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ event_logger_.reset(new EventLogger(kEventLogHistorySize));
drive_service_.reset(drive_service);
cache_ = DriveCache::CreateDriveCache(cache_root, blocking_task_runner_);
uploader_.reset(new google_apis::DriveUploader(drive_service_.get()));
@@ -220,6 +224,7 @@ void DriveSystemService::AddDriveMountPoint() {
BrowserContext::GetDefaultStoragePartition(profile_)->
GetFileSystemContext()->external_provider();
if (provider && !provider->HasMountPoint(mount_point)) {
+ event_logger_->Log("AddDriveMountPoint");
provider->AddRemoteMountPoint(
mount_point,
new DriveFileSystemProxy(file_system_.get()));
@@ -238,8 +243,10 @@ void DriveSystemService::RemoveDriveMountPoint() {
fileapi::ExternalFileSystemMountPointProvider* provider =
BrowserContext::GetDefaultStoragePartition(profile_)->
GetFileSystemContext()->external_provider();
- if (provider && provider->HasMountPoint(mount_point))
+ if (provider && provider->HasMountPoint(mount_point)) {
provider->RemoveMountPoint(mount_point);
+ event_logger_->Log("RemoveDriveMountPoint");
+ }
}
void DriveSystemService::OnCacheInitialized(bool success) {
« no previous file with comments | « chrome/browser/chromeos/drive/drive_system_service.h ('k') | chrome/browser/chromeos/drive/event_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698