Add logging to ExtensionsService, UserScriptMaster,
and PluginChannel to be able to see what happens
when chrome runs extensions headless.

It would be better to modify the existing
IPC::Logging mechanism than add logging to
PluginChannel, so that it could be useful for
debugging other types of IPC problems. But I don't
have time to do that right now.

Review URL: http://codereview.chromium.org/28091

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10302 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index a8c395c..17c5afe 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -183,6 +183,8 @@
   if (!file_util::AbsolutePath(&path))
     NOTREACHED();
 
+  LOG(INFO) << "Loading installed extensions...";
+
   // Find all child directories in the install directory and load their
   // manifests. Post errors and results to the frontend.
   scoped_ptr<ExtensionList> extensions(new ExtensionList);
@@ -199,12 +201,17 @@
       continue;
     }
 
+    LOG(INFO) << "  " << WideToASCII(child_path.BaseName().ToWStringHack()) <<
+       " version: " << version_str;
+
     child_path = child_path.AppendASCII(version_str);
     Extension* extension = LoadExtension(child_path, frontend);
     if (extension)
       extensions->push_back(extension);
   }
 
+  LOG(INFO) << "Done.";
+
   ReportExtensionsLoaded(frontend.get(), extensions.release());
   return true;
 }
@@ -215,6 +222,10 @@
   FilePath path = path_in;
   if (!file_util::AbsolutePath(&path))
     NOTREACHED();
+
+  LOG(INFO) << "Loading single extension from " <<
+      WideToASCII(path.BaseName().ToWStringHack());
+
   Extension* extension = LoadExtension(path, frontend);
   if (extension) {
     ExtensionList* extensions = new ExtensionList;