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

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

Issue 665133004: Skip enhanced bookmarks cluster requests if it's not being used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_BOOKMARK_SERVER_SERVICE_H_ 5 #ifndef COMPONENTS_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_SERVICE_H_
6 #define COMPONENTS_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_SERVICE_H_ 6 #define COMPONENTS_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 29 matching lines...) Expand all
40 private OAuth2TokenService::Consumer, 40 private OAuth2TokenService::Consumer,
41 public EnhancedBookmarkModelObserver { 41 public EnhancedBookmarkModelObserver {
42 public: 42 public:
43 BookmarkServerService( 43 BookmarkServerService(
44 scoped_refptr<net::URLRequestContextGetter> request_context_getter, 44 scoped_refptr<net::URLRequestContextGetter> request_context_getter,
45 ProfileOAuth2TokenService* token_service, 45 ProfileOAuth2TokenService* token_service,
46 SigninManagerBase* signin_manager, 46 SigninManagerBase* signin_manager,
47 EnhancedBookmarkModel* enhanced_bookmark_model); 47 EnhancedBookmarkModel* enhanced_bookmark_model);
48 virtual ~BookmarkServerService(); 48 virtual ~BookmarkServerService();
49 49
50 void AddObserver(BookmarkServerServiceObserver* observer); 50 virtual void AddObserver(BookmarkServerServiceObserver* observer);
51 void RemoveObserver(BookmarkServerServiceObserver* observer); 51 void RemoveObserver(BookmarkServerServiceObserver* observer);
52 bool MightHaveObservers();
danduong 2014/10/20 18:45:38 Any reason we don't just expose observers as prote
Kibeom Kim (inactive) 2014/10/20 20:05:47 Done.
52 53
53 protected: 54 protected:
54 // Retrieves a bookmark by using its remote id. Returns null if nothing 55 // Retrieves a bookmark by using its remote id. Returns null if nothing
55 // matches. 56 // matches.
56 virtual const BookmarkNode* BookmarkForRemoteId( 57 virtual const BookmarkNode* BookmarkForRemoteId(
57 const std::string& remote_id) const; 58 const std::string& remote_id) const;
58 const std::string RemoteIDForBookmark(const BookmarkNode* bookmark) const; 59 const std::string RemoteIDForBookmark(const BookmarkNode* bookmark) const;
59 60
60 // Notifies the observers that something changed. 61 // Notifies the observers that something changed.
61 void Notify(); 62 void Notify();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // To have access to the right context getter for the profile. 112 // To have access to the right context getter for the profile.
112 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; 113 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
113 // The fetcher used to query the server. 114 // The fetcher used to query the server.
114 scoped_ptr<net::URLFetcher> url_fetcher_; 115 scoped_ptr<net::URLFetcher> url_fetcher_;
115 116
116 DISALLOW_COPY_AND_ASSIGN(BookmarkServerService); 117 DISALLOW_COPY_AND_ASSIGN(BookmarkServerService);
117 }; 118 };
118 } // namespace enhanced_bookmarks 119 } // namespace enhanced_bookmarks
119 120
120 #endif // COMPONENTS_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_SERVICE_H_ 121 #endif // COMPONENTS_ENHANCED_BOOKMARKS_BOOKMARK_SERVER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698