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

Unified Diff: chrome/browser/sync_file_system/drive_backend/list_changes_task.cc

Issue 94003004: [SyncFS] Add verbose logging to SyncEngineInitializer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | « no previous file | chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/list_changes_task.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc b/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc
index 535f4efc01fdf5a9fb1fed02f64ba96cd93831ec..9ecad64df54c64b8121c33b540a3c4628aa3f821 100644
--- a/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc
+++ b/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/sync_file_system/drive_backend/sync_engine_context.h"
#include "chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_util.h"
#include "chrome/browser/sync_file_system/logger.h"
+#include "chrome/browser/sync_file_system/logger.h"
#include "chrome/browser/sync_file_system/syncable_file_system_util.h"
#include "google_apis/drive/drive_api_parser.h"
#include "google_apis/drive/gdata_wapi_parser.h"
@@ -45,8 +46,11 @@ ListChangesTask::~ListChangesTask() {
}
void ListChangesTask::Run(const SyncStatusCallback& callback) {
+ util::Log(logging::LOG_VERBOSE, FROM_HERE, "[Changes] Start.");
+
if (!IsContextReady()) {
- util::Log(logging::LOG_ERROR, FROM_HERE, "Failed to get required sercive.");
+ util::Log(logging::LOG_VERBOSE, FROM_HERE,
+ "[Changes] Failed to get required sercive.");
RunSoon(FROM_HERE, base::Bind(callback, SYNC_STATUS_FAILED));
return;
}
@@ -63,13 +67,16 @@ void ListChangesTask::DidListChanges(
scoped_ptr<google_apis::ResourceList> resource_list) {
SyncStatusCode status = GDataErrorCodeToSyncStatusCode(error);
if (status != SYNC_STATUS_OK) {
- util::Log(logging::LOG_ERROR, FROM_HERE, "Failed to fetch change list.");
+ util::Log(logging::LOG_VERBOSE, FROM_HERE,
+ "[Changes] Failed to fetch change list.");
callback.Run(SYNC_STATUS_NETWORK_ERROR);
return;
}
if (!resource_list) {
NOTREACHED();
+ util::Log(logging::LOG_VERBOSE, FROM_HERE,
+ "[Changes] Got invalid change list.");
callback.Run(SYNC_STATUS_FAILED);
return;
}
@@ -95,10 +102,14 @@ void ListChangesTask::DidListChanges(
}
if (change_list_.empty()) {
+ util::Log(logging::LOG_VERBOSE, FROM_HERE, "[Changes] Got no change.");
callback.Run(SYNC_STATUS_NO_CHANGE_TO_SYNC);
return;
}
+ util::Log(logging::LOG_VERBOSE, FROM_HERE,
+ "[Changes] Got %zd changes, updating MetadataDatabase.",
+ change_list_.size());
metadata_database()->UpdateByChangeList(
resource_list->largest_changestamp(),
change_list_.Pass(), callback);
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698