| Index: chrome/browser/bookmarks/bookmark_expanded_state_tracker.cc
|
| ===================================================================
|
| --- chrome/browser/bookmarks/bookmark_expanded_state_tracker.cc (revision 141067)
|
| +++ chrome/browser/bookmarks/bookmark_expanded_state_tracker.cc (working copy)
|
| @@ -10,15 +10,16 @@
|
| #include "chrome/browser/prefs/pref_service.h"
|
| #include "chrome/browser/profiles/profile.h"
|
|
|
| -BookmarkExpandedStateTracker::BookmarkExpandedStateTracker(Profile* profile,
|
| - const char* path)
|
| +BookmarkExpandedStateTracker::BookmarkExpandedStateTracker(
|
| + Profile* profile,
|
| + const char* path,
|
| + BookmarkModel* bookmark_model)
|
| : profile_(profile),
|
| pref_path_(path) {
|
| - profile_->GetBookmarkModel()->AddObserver(this);
|
| + bookmark_model->AddObserver(this);
|
| }
|
|
|
| BookmarkExpandedStateTracker::~BookmarkExpandedStateTracker() {
|
| - profile_->GetBookmarkModel()->RemoveObserver(this);
|
| }
|
|
|
| void BookmarkExpandedStateTracker::SetExpandedNodes(const Nodes& nodes) {
|
| @@ -71,6 +72,7 @@
|
|
|
| void BookmarkExpandedStateTracker::BookmarkModelBeingDeleted(
|
| BookmarkModel* model) {
|
| + model->RemoveObserver(this);
|
| }
|
|
|
| void BookmarkExpandedStateTracker::BookmarkNodeRemoved(
|
|
|