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

Unified Diff: components/bookmarks/browser/bookmark_model.cc

Issue 370323002: Replace refcounting with weak pointers for BookmarkStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « components/bookmarks/browser/bookmark_model.h ('k') | components/bookmarks/browser/bookmark_storage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/bookmarks/browser/bookmark_model.cc
diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmarks/browser/bookmark_model.cc
index 13cd1ee1ae1dc163e39eb69a4f09273a92839ede..df347fb339977469d922ae79c7674fb24d891c68 100644
--- a/components/bookmarks/browser/bookmark_model.cc
+++ b/components/bookmarks/browser/bookmark_model.cc
@@ -147,7 +147,7 @@ void BookmarkModel::Load(
new BookmarkExpandedStateTracker(this, pref_service));
// Load the bookmarks. BookmarkStorage notifies us when done.
- store_ = new BookmarkStorage(this, profile_path, io_task_runner.get());
+ store_ .reset(new BookmarkStorage(this, profile_path, io_task_runner.get()));
store_->LoadBookmarks(CreateLoadDetails(accept_languages), ui_task_runner);
}
@@ -700,7 +700,7 @@ void BookmarkModel::GetBookmarksMatching(
}
void BookmarkModel::ClearStore() {
- store_ = NULL;
+ store_.reset();
}
void BookmarkModel::SetPermanentNodeVisible(BookmarkNode::Type type,
« no previous file with comments | « components/bookmarks/browser/bookmark_model.h ('k') | components/bookmarks/browser/bookmark_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698