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

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

Issue 15657002: Mirror syncfs log to console and WebUI, with LogSeverity support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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: chrome/browser/sync_file_system/local_file_sync_service.cc
diff --git a/chrome/browser/sync_file_system/local_file_sync_service.cc b/chrome/browser/sync_file_system/local_file_sync_service.cc
index 671daebdaec70835462419d0f9af23c29c7c6b1e..4a0508b985a557cc36c5d5f435b509840f4d62a4 100644
--- a/chrome/browser/sync_file_system/local_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/local_file_sync_service.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync_file_system/local_change_processor.h"
+#include "chrome/browser/sync_file_system/logger.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/site_instance.h"
@@ -200,8 +201,11 @@ void LocalFileSyncService::PrepareForProcessRemoteChange(
const extensions::Extension* extension = extension_service->GetInstalledApp(
url.origin());
if (!extension) {
- LOG(WARNING) << "PrepareForProcessRemoteChange called for non-existing "
- << " origin:" << url.origin().spec();
+ std::string warn_msg = std::string(
nhiroki 2013/05/22 05:42:40 How about using std::ostringstream?
calvinlo 2013/05/22 08:42:56 Done.
+ "PrepareForProcessRemoteChange called for non-existing origin:")
nhiroki 2013/05/22 05:42:40 super-nit: s/origin:/origin: / for readability
calvinlo 2013/05/22 08:42:56 Done.
+ .append(url.origin().spec());
+ util::Log(logging::LOG_WARNING, warn_msg);
+
// The extension has been uninstalled and this method is called
// before the remote changes for the origin are removed.
callback.Run(SYNC_STATUS_NO_CHANGE_TO_SYNC,

Powered by Google App Engine
This is Rietveld 408576698