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

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

Issue 562693002: Move TestBookmarkClient into bookmarks namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix enhanced_bookmarks 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_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 20 matching lines...) Expand all
31 class SequencedTaskRunner; 31 class SequencedTaskRunner;
32 } 32 }
33 33
34 namespace bookmarks { 34 namespace bookmarks {
35 class BookmarkCodecTest; 35 class BookmarkCodecTest;
36 class BookmarkExpandedStateTracker; 36 class BookmarkExpandedStateTracker;
37 class BookmarkIndex; 37 class BookmarkIndex;
38 class BookmarkLoadDetails; 38 class BookmarkLoadDetails;
39 class BookmarkStorage; 39 class BookmarkStorage;
40 class ScopedGroupBookmarkActions; 40 class ScopedGroupBookmarkActions;
41 class TestBookmarkClient;
41 struct BookmarkMatch; 42 struct BookmarkMatch;
42 } 43 }
43 44
44 namespace favicon_base { 45 namespace favicon_base {
45 struct FaviconImageResult; 46 struct FaviconImageResult;
46 } 47 }
47 48
48 namespace test {
49 class TestBookmarkClient;
50 }
51
52 // BookmarkModel -------------------------------------------------------------- 49 // BookmarkModel --------------------------------------------------------------
53 50
54 // BookmarkModel provides a directed acyclic graph of URLs and folders. 51 // BookmarkModel provides a directed acyclic graph of URLs and folders.
55 // Three graphs are provided for the three entry points: those on the 'bookmarks 52 // Three graphs are provided for the three entry points: those on the 'bookmarks
56 // bar', those in the 'other bookmarks' folder and those in the 'mobile' folder. 53 // bar', those in the 'other bookmarks' folder and those in the 'mobile' folder.
57 // 54 //
58 // An observer may be attached to observe relevant events. 55 // An observer may be attached to observe relevant events.
59 // 56 //
60 // You should NOT directly create a BookmarkModel, instead go through the 57 // You should NOT directly create a BookmarkModel, instead go through the
61 // BookmarkModelFactory. 58 // BookmarkModelFactory.
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // be refetched. This notification is sent by BookmarkClient. 279 // be refetched. This notification is sent by BookmarkClient.
283 void OnFaviconChanged(const std::set<GURL>& urls); 280 void OnFaviconChanged(const std::set<GURL>& urls);
284 281
285 // Returns the client used by this BookmarkModel. 282 // Returns the client used by this BookmarkModel.
286 bookmarks::BookmarkClient* client() const { return client_; } 283 bookmarks::BookmarkClient* client() const { return client_; }
287 284
288 private: 285 private:
289 friend class bookmarks::BookmarkCodecTest; 286 friend class bookmarks::BookmarkCodecTest;
290 friend class bookmarks::BookmarkStorage; 287 friend class bookmarks::BookmarkStorage;
291 friend class bookmarks::ScopedGroupBookmarkActions; 288 friend class bookmarks::ScopedGroupBookmarkActions;
292 friend class test::TestBookmarkClient; 289 friend class bookmarks::TestBookmarkClient;
293 290
294 // Used to order BookmarkNodes by URL. 291 // Used to order BookmarkNodes by URL.
295 class NodeURLComparator { 292 class NodeURLComparator {
296 public: 293 public:
297 bool operator()(const BookmarkNode* n1, const BookmarkNode* n2) const { 294 bool operator()(const BookmarkNode* n1, const BookmarkNode* n2) const {
298 return n1->url() < n2->url(); 295 return n1->url() < n2->url();
299 } 296 }
300 }; 297 };
301 298
302 // Implementation of IsBookmarked. Before calling this the caller must obtain 299 // Implementation of IsBookmarked. Before calling this the caller must obtain
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 414
418 // See description of IsDoingExtensiveChanges above. 415 // See description of IsDoingExtensiveChanges above.
419 int extensive_changes_; 416 int extensive_changes_;
420 417
421 scoped_ptr<bookmarks::BookmarkExpandedStateTracker> expanded_state_tracker_; 418 scoped_ptr<bookmarks::BookmarkExpandedStateTracker> expanded_state_tracker_;
422 419
423 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); 420 DISALLOW_COPY_AND_ASSIGN(BookmarkModel);
424 }; 421 };
425 422
426 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ 423 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_
OLDNEW
« no previous file with comments | « components/bookmarks/browser/bookmark_index_unittest.cc ('k') | components/bookmarks/browser/bookmark_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698