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

Side by Side Diff: components/bookmarks/browser/bookmark_model.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | components/bookmarks/browser/bookmark_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_
6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 // WARNING: |nodes_ordered_by_url_set_| is accessed on multiple threads. As 404 // WARNING: |nodes_ordered_by_url_set_| is accessed on multiple threads. As
405 // such, be sure and wrap all usage of it around |url_lock_|. 405 // such, be sure and wrap all usage of it around |url_lock_|.
406 typedef std::multiset<BookmarkNode*, NodeURLComparator> NodesOrderedByURLSet; 406 typedef std::multiset<BookmarkNode*, NodeURLComparator> NodesOrderedByURLSet;
407 NodesOrderedByURLSet nodes_ordered_by_url_set_; 407 NodesOrderedByURLSet nodes_ordered_by_url_set_;
408 base::Lock url_lock_; 408 base::Lock url_lock_;
409 409
410 // Used for loading favicons. 410 // Used for loading favicons.
411 base::CancelableTaskTracker cancelable_task_tracker_; 411 base::CancelableTaskTracker cancelable_task_tracker_;
412 412
413 // Reads/writes bookmarks to disk. 413 // Reads/writes bookmarks to disk.
414 scoped_refptr<bookmarks::BookmarkStorage> store_; 414 scoped_ptr<bookmarks::BookmarkStorage> store_;
415 415
416 scoped_ptr<bookmarks::BookmarkIndex> index_; 416 scoped_ptr<bookmarks::BookmarkIndex> index_;
417 417
418 // True if URLs are stored in the BookmarkIndex in addition to bookmark 418 // True if URLs are stored in the BookmarkIndex in addition to bookmark
419 // titles. 419 // titles.
420 const bool index_urls_; 420 const bool index_urls_;
421 421
422 base::WaitableEvent loaded_signal_; 422 base::WaitableEvent loaded_signal_;
423 423
424 // See description of IsDoingExtensiveChanges above. 424 // See description of IsDoingExtensiveChanges above.
425 int extensive_changes_; 425 int extensive_changes_;
426 426
427 scoped_ptr<bookmarks::BookmarkExpandedStateTracker> expanded_state_tracker_; 427 scoped_ptr<bookmarks::BookmarkExpandedStateTracker> expanded_state_tracker_;
428 428
429 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); 429 DISALLOW_COPY_AND_ASSIGN(BookmarkModel);
430 }; 430 };
431 431
432 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ 432 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | components/bookmarks/browser/bookmark_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698