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

Unified Diff: chrome/test/live_sync/live_sync_extension_helper.cc

Issue 7024058: [Sync] Clean up sync logging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 9 years, 6 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/sessions/session_state.cc ('k') | chrome/test/live_sync/live_sync_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/live_sync/live_sync_extension_helper.cc
diff --git a/chrome/test/live_sync/live_sync_extension_helper.cc b/chrome/test/live_sync/live_sync_extension_helper.cc
index a3e3fc7ef85de0b509fdbae71abf3c43b9703282..dc260adee85c1b8a4bc97746b3f49397f2f7850a 100644
--- a/chrome/test/live_sync/live_sync_extension_helper.cc
+++ b/chrome/test/live_sync/live_sync_extension_helper.cc
@@ -16,16 +16,6 @@
#include "chrome/test/live_sync/live_sync_test.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace {
-
-std::string GetProfileName(Profile* profile) {
- const std::string& name = profile->GetPath().BaseName().MaybeAsASCII();
- EXPECT_FALSE(name.empty());
- return name;
-}
-
-} // namespace
-
LiveSyncExtensionHelper::LiveSyncExtensionHelper() {}
LiveSyncExtensionHelper::~LiveSyncExtensionHelper() {}
@@ -91,7 +81,7 @@ void LiveSyncExtensionHelper::InstallExtensionsPendingForSync(
StringMap::const_iterator it2 = id_to_name_.find(id);
if (it2 == id_to_name_.end()) {
ADD_FAILURE() << "Could not get name for id " << id
- << " (profile = " << GetProfileName(profile) << ")";
+ << " (profile = " << profile->GetDebugName() << ")";
continue;
}
InstallExtension(profile, it2->second, type);
@@ -101,7 +91,7 @@ void LiveSyncExtensionHelper::InstallExtensionsPendingForSync(
LiveSyncExtensionHelper::ExtensionStateMap
LiveSyncExtensionHelper::GetExtensionStates(
Profile* profile) const {
- const std::string& profile_name = GetProfileName(profile);
+ const std::string& profile_debug_name = profile->GetDebugName();
ExtensionStateMap extension_state_map;
@@ -112,7 +102,7 @@ LiveSyncExtensionHelper::ExtensionStateMap
it != extensions->end(); ++it) {
extension_state_map[(*it)->id()] = ENABLED;
VLOG(2) << "Extension " << (*it)->id() << " in profile "
- << profile_name << " is enabled";
+ << profile_debug_name << " is enabled";
}
const ExtensionList* disabled_extensions =
@@ -121,7 +111,7 @@ LiveSyncExtensionHelper::ExtensionStateMap
it != disabled_extensions->end(); ++it) {
extension_state_map[(*it)->id()] = DISABLED;
VLOG(2) << "Extension " << (*it)->id() << " in profile "
- << profile_name << " is disabled";
+ << profile_debug_name << " is disabled";
}
const PendingExtensionManager* pending_extension_manager =
@@ -131,7 +121,7 @@ LiveSyncExtensionHelper::ExtensionStateMap
it != pending_extension_manager->end(); ++it) {
extension_state_map[it->first] = PENDING;
VLOG(2) << "Extension " << it->first << " in profile "
- << profile_name << " is pending";
+ << profile_debug_name << " is pending";
}
return extension_state_map;
« no previous file with comments | « chrome/browser/sync/sessions/session_state.cc ('k') | chrome/test/live_sync/live_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698