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

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

Issue 335453004: Move BookmarkExpandedStateTracker into bookmarks namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
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>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "base/synchronization/lock.h" 18 #include "base/synchronization/lock.h"
19 #include "base/synchronization/waitable_event.h" 19 #include "base/synchronization/waitable_event.h"
20 #include "components/bookmarks/browser/bookmark_client.h" 20 #include "components/bookmarks/browser/bookmark_client.h"
21 #include "components/bookmarks/browser/bookmark_node.h" 21 #include "components/bookmarks/browser/bookmark_node.h"
22 #include "ui/gfx/image/image.h" 22 #include "ui/gfx/image/image.h"
23 #include "url/gurl.h" 23 #include "url/gurl.h"
24 24
25 class BookmarkExpandedStateTracker;
26 class BookmarkModelObserver; 25 class BookmarkModelObserver;
27 class PrefService; 26 class PrefService;
28 27
29 namespace base { 28 namespace base {
30 class FilePath; 29 class FilePath;
31 class SequencedTaskRunner; 30 class SequencedTaskRunner;
32 } 31 }
33 32
34 namespace bookmarks { 33 namespace bookmarks {
34 class BookmarkExpandedStateTracker;
35 class BookmarkIndex; 35 class BookmarkIndex;
36 class BookmarkLoadDetails; 36 class BookmarkLoadDetails;
37 class BookmarkStorage; 37 class BookmarkStorage;
38 class ScopedGroupBookmarkActions; 38 class ScopedGroupBookmarkActions;
39 struct BookmarkMatch; 39 struct BookmarkMatch;
40 } 40 }
41 41
42 namespace favicon_base { 42 namespace favicon_base {
43 struct FaviconImageResult; 43 struct FaviconImageResult;
44 } 44 }
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Sets the store to NULL, making it so the BookmarkModel does not persist 250 // Sets the store to NULL, making it so the BookmarkModel does not persist
251 // any changes to disk. This is only useful during testing to speed up 251 // any changes to disk. This is only useful during testing to speed up
252 // testing. 252 // testing.
253 void ClearStore(); 253 void ClearStore();
254 254
255 // Returns the next node ID. 255 // Returns the next node ID.
256 int64 next_node_id() const { return next_node_id_; } 256 int64 next_node_id() const { return next_node_id_; }
257 257
258 // Returns the object responsible for tracking the set of expanded nodes in 258 // Returns the object responsible for tracking the set of expanded nodes in
259 // the bookmark editor. 259 // the bookmark editor.
260 BookmarkExpandedStateTracker* expanded_state_tracker() { 260 bookmarks::BookmarkExpandedStateTracker* expanded_state_tracker() {
261 return expanded_state_tracker_.get(); 261 return expanded_state_tracker_.get();
262 } 262 }
263 263
264 // Sets the visibility of one of the permanent nodes (unless the node must 264 // Sets the visibility of one of the permanent nodes (unless the node must
265 // always be visible, see |BookmarkClient::IsPermanentNodeVisible| for more 265 // always be visible, see |BookmarkClient::IsPermanentNodeVisible| for more
266 // details). This is set by sync. 266 // details). This is set by sync.
267 void SetPermanentNodeVisible(BookmarkNode::Type type, bool value); 267 void SetPermanentNodeVisible(BookmarkNode::Type type, bool value);
268 268
269 // Returns the permanent node of type |type|. 269 // Returns the permanent node of type |type|.
270 const BookmarkPermanentNode* PermanentNode(BookmarkNode::Type type); 270 const BookmarkPermanentNode* PermanentNode(BookmarkNode::Type type);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 420
421 // True if URLs are stored in the BookmarkIndex in addition to bookmark 421 // True if URLs are stored in the BookmarkIndex in addition to bookmark
422 // titles. 422 // titles.
423 const bool index_urls_; 423 const bool index_urls_;
424 424
425 base::WaitableEvent loaded_signal_; 425 base::WaitableEvent loaded_signal_;
426 426
427 // See description of IsDoingExtensiveChanges above. 427 // See description of IsDoingExtensiveChanges above.
428 int extensive_changes_; 428 int extensive_changes_;
429 429
430 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; 430 scoped_ptr<bookmarks::BookmarkExpandedStateTracker> expanded_state_tracker_;
431 431
432 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); 432 DISALLOW_COPY_AND_ASSIGN(BookmarkModel);
433 }; 433 };
434 434
435 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ 435 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698