From 9ecd399719439f11461912ee56a9d51763239a26 Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Fri, 16 Jul 2010 02:39:47 +0000 Subject: Factor out OriginToString into a common function in chrome/common/. With that, notifications doesn't depend on geolocation code anymore. (NOTE: this was a TODO for bulach). BUG=None TEST=out/Debug/unit_tests --gtest_filter=ContentSettingsHelperTest.* Signed-off-by: Thiago Farina Review URL: http://codereview.chromium.org/2910005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52597 0039d316-1c4b-4281-b951-d872f2087c98 --- .../browser/notifications/notification_exceptions_table_model.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'chrome/browser/notifications/notification_exceptions_table_model.cc') diff --git a/chrome/browser/notifications/notification_exceptions_table_model.cc b/chrome/browser/notifications/notification_exceptions_table_model.cc index f4e8d68..fdb08f4 100644 --- a/chrome/browser/notifications/notification_exceptions_table_model.cc +++ b/chrome/browser/notifications/notification_exceptions_table_model.cc @@ -8,7 +8,7 @@ #include "app/l10n_util_collator.h" #include "app/table_model_observer.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/geolocation/geolocation_content_settings_map.h" +#include "chrome/common/content_settings_helper.h" #include "chrome/common/url_constants.h" #include "grit/generated_resources.h" @@ -64,10 +64,7 @@ std::wstring NotificationExceptionsTableModel::GetText(int row, int column_id) { const Entry& entry = entries_[row]; if (column_id == IDS_EXCEPTIONS_HOSTNAME_HEADER) { - // TODO(bulach): factor out in a common function so that Notifications won't - // depend on Geolocation. - return UTF8ToWide(GeolocationContentSettingsMap::OriginToString( - entry.origin)); + return content_settings_helper::OriginToWString(entry.origin); } if (column_id == IDS_EXCEPTIONS_ACTION_HEADER) { -- cgit v1.1