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

Side by Side Diff: components/enhanced_bookmarks/enhanced_bookmark_model.h

Issue 588233002: Fix lifetime of EnhancedBookmarkModel & BookmarkImageService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation of unittests Created 6 years, 3 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
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_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_H_ 5 #ifndef COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_H_
6 #define COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_H_ 6 #define COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 20 matching lines...) Expand all
31 31
32 // Wrapper around BookmarkModel providing utility functions for enhanced 32 // Wrapper around BookmarkModel providing utility functions for enhanced
33 // bookmarks. 33 // bookmarks.
34 class EnhancedBookmarkModel : public KeyedService, 34 class EnhancedBookmarkModel : public KeyedService,
35 public BaseBookmarkModelObserver { 35 public BaseBookmarkModelObserver {
36 public: 36 public:
37 EnhancedBookmarkModel(BookmarkModel* bookmark_model, 37 EnhancedBookmarkModel(BookmarkModel* bookmark_model,
38 const std::string& version); 38 const std::string& version);
39 virtual ~EnhancedBookmarkModel(); 39 virtual ~EnhancedBookmarkModel();
40 40
41 virtual void ShutDown(); 41 virtual void Shutdown() OVERRIDE;
42 42
43 void AddObserver(EnhancedBookmarkModelObserver* observer); 43 void AddObserver(EnhancedBookmarkModelObserver* observer);
44 void RemoveObserver(EnhancedBookmarkModelObserver* observer); 44 void RemoveObserver(EnhancedBookmarkModelObserver* observer);
45 45
46 // Moves |node| to |new_parent| and inserts it at the given |index|. 46 // Moves |node| to |new_parent| and inserts it at the given |index|.
47 void Move(const BookmarkNode* node, 47 void Move(const BookmarkNode* node,
48 const BookmarkNode* new_parent, 48 const BookmarkNode* new_parent,
49 int index); 49 int index);
50 50
51 // Adds a new folder node at the specified position. 51 // Adds a new folder node at the specified position.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // Caches the remote id of a node before its meta info changes. 195 // Caches the remote id of a node before its meta info changes.
196 std::string prev_remote_id_; 196 std::string prev_remote_id_;
197 197
198 std::string version_; 198 std::string version_;
199 std::string version_suffix_; 199 std::string version_suffix_;
200 }; 200 };
201 201
202 } // namespace enhanced_bookmarks 202 } // namespace enhanced_bookmarks
203 203
204 #endif // COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_H_ 204 #endif // COMPONENTS_ENHANCED_BOOKMARKS_ENHANCED_BOOKMARK_MODEL_H_
OLDNEW
« no previous file with comments | « components/enhanced_bookmarks/bookmark_image_service.cc ('k') | components/enhanced_bookmarks/enhanced_bookmark_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698