diff options
author | nyquist@chromium.org <nyquist@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-17 00:25:18 +0000 |
---|---|---|
committer | nyquist@chromium.org <nyquist@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-17 00:25:18 +0000 |
commit | b68a817a650e9595ec93b5406e0d3d3077cd5dc5 (patch) | |
tree | d170b394c85a6b125b77beafc131cbcbe4152cb8 /chrome/browser/importer | |
parent | 868332480197afa837b3381d9533ffc7d16d0c41 (diff) | |
download | chromium_src-b68a817a650e9595ec93b5406e0d3d3077cd5dc5.zip chromium_src-b68a817a650e9595ec93b5406e0d3d3077cd5dc5.tar.gz chromium_src-b68a817a650e9595ec93b5406e0d3d3077cd5dc5.tar.bz2 |
Adding ExtensiveChanges state to BookmarkModel.
Some BookmarkModelObservers needs to know when the BookmarkModel might see
extensive changes, such as during import and sync. Import already has
functionality to inform observers about it, and this uses the same framework
for the same types of messages while syncing.
Since observers such as the NTP might be created after the BookmarkModel sends
out the initial BookmarkModelObserver::ExtensiveBookmarkChangesBeginning(...)
event, the state is also kept so observers can call
BookmarkModel::IsDoingExtensiveChanges() during their own initialization.
BUG=113666
TEST=unit_tests
Review URL: http://codereview.chromium.org/9380015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122404 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r-- | chrome/browser/importer/profile_writer.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc index 8b8bfa8..f93a32d 100644 --- a/chrome/browser/importer/profile_writer.cc +++ b/chrome/browser/importer/profile_writer.cc @@ -146,7 +146,7 @@ void ProfileWriter::AddBookmarks(const std::vector<BookmarkEntry>& bookmarks, // for unnecessary nesting. bool add_all_to_top_level = import_to_top_level && toolbar_bookmarks.empty(); - model->BeginImportMode(); + model->BeginExtensiveChanges(); std::set<const BookmarkNode*> folders_added_to; const BookmarkNode* top_level_folder = NULL; @@ -217,7 +217,7 @@ void ProfileWriter::AddBookmarks(const std::vector<BookmarkEntry>& bookmarks, model->ResetDateFolderModified(*i); } - model->EndImportMode(); + model->EndExtensiveChanges(); // If the user was previously using a toolbar, we should show the bar. if (import_to_top_level && !add_all_to_top_level) |