diff options
author | zork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-02 00:26:12 +0000 |
---|---|---|
committer | zork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-02 00:26:12 +0000 |
commit | c01631a1fcc2827db01ddaacf4038e284d4af912 (patch) | |
tree | c4c416d8f5b90109f8bbf872e31bcd686bdaef1a | |
parent | 7eb546401ee80432c3a7498300168424909bedf8 (diff) | |
download | chromium_src-c01631a1fcc2827db01ddaacf4038e284d4af912.zip chromium_src-c01631a1fcc2827db01ddaacf4038e284d4af912.tar.gz chromium_src-c01631a1fcc2827db01ddaacf4038e284d4af912.tar.bz2 |
Revert 43413 - Add a notification when the list of startup URLs change.
BUG=38557
TEST=Run two instances of chromes with difference profiles that are syncing. Change the startup pages. Check that the change propagates.
Review URL: http://codereview.chromium.org/1562008
TBR=zork@chromium.org
Review URL: http://codereview.chromium.org/1539014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43416 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/pref_service.h | 2 | ||||
-rw-r--r-- | chrome/browser/session_startup_pref.cc | 15 | ||||
-rw-r--r-- | chrome/browser/views/options/general_page_view.cc | 1 |
3 files changed, 1 insertions, 17 deletions
diff --git a/chrome/browser/pref_service.h b/chrome/browser/pref_service.h index 20c2e9c..85dd42c 100644 --- a/chrome/browser/pref_service.h +++ b/chrome/browser/pref_service.h @@ -185,8 +185,6 @@ class PrefService : public NonThreadSafe, virtual bool SerializeData(std::string* output); private: - friend struct SessionStartupPref; - // Add a preference to the PreferenceMap. If the pref already exists, return // false. This method takes ownership of |pref|. void RegisterPreference(Preference* pref); diff --git a/chrome/browser/session_startup_pref.cc b/chrome/browser/session_startup_pref.cc index 32d85d6..ff919d0 100644 --- a/chrome/browser/session_startup_pref.cc +++ b/chrome/browser/session_startup_pref.cc @@ -10,7 +10,6 @@ #include "chrome/browser/defaults.h" #include "chrome/browser/pref_service.h" #include "chrome/browser/profile.h" -#include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" namespace { @@ -73,20 +72,6 @@ void SessionStartupPref::SetStartupPref(PrefService* prefs, url_pref_list->Set(static_cast<int>(i), new StringValue(UTF8ToWide(pref.urls[i].spec()))); } - - std::wstring path_str(prefs::kURLsToRestoreOnStartup); - PrefService::PrefObserverMap::iterator observer_iterator = - prefs->pref_observers_.find(path_str); - if (observer_iterator != prefs->pref_observers_.end()) { - PrefService::NotificationObserverList::Iterator it( - *(observer_iterator->second)); - NotificationObserver* observer; - while ((observer = it.GetNext()) != NULL) { - observer->Observe(NotificationType::PREF_CHANGED, - Source<PrefService>(prefs), - Details<std::wstring>(&path_str)); - } - } } // static diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc index 5b86c35..9cfc14f 100644 --- a/chrome/browser/views/options/general_page_view.cc +++ b/chrome/browser/views/options/general_page_view.cc @@ -156,6 +156,7 @@ void CustomHomePagesTableModel::Add(int index, const GURL& url) { DCHECK(index >= 0 && index <= RowCount()); entries_.insert(entries_.begin() + static_cast<size_t>(index), Entry()); entries_[index].url = url; + LoadFavIcon(&(entries_[index])); if (observer_) observer_->OnItemsAdded(index, 1); } |