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

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

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 #include "components/enhanced_bookmarks/bookmark_server_service.h" 5 #include "components/enhanced_bookmarks/bookmark_server_service.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "components/enhanced_bookmarks/enhanced_bookmark_model.h" 8 #include "components/enhanced_bookmarks/enhanced_bookmark_model.h"
9 #include "components/signin/core/browser/profile_oauth2_token_service.h" 9 #include "components/signin/core/browser/profile_oauth2_token_service.h"
10 #include "components/signin/core/browser/signin_manager_base.h" 10 #include "components/signin/core/browser/signin_manager_base.h"
(...skipping 28 matching lines...) Expand all
39 void BookmarkServerService::AddObserver( 39 void BookmarkServerService::AddObserver(
40 BookmarkServerServiceObserver* observer) { 40 BookmarkServerServiceObserver* observer) {
41 observers_.AddObserver(observer); 41 observers_.AddObserver(observer);
42 } 42 }
43 43
44 void BookmarkServerService::RemoveObserver( 44 void BookmarkServerService::RemoveObserver(
45 BookmarkServerServiceObserver* observer) { 45 BookmarkServerServiceObserver* observer) {
46 observers_.RemoveObserver(observer); 46 observers_.RemoveObserver(observer);
47 } 47 }
48 48
49 bool BookmarkServerService::MightHaveObservers() {
50 return observers_.might_have_observers();
51 }
52
49 const BookmarkNode* BookmarkServerService::BookmarkForRemoteId( 53 const BookmarkNode* BookmarkServerService::BookmarkForRemoteId(
50 const std::string& remote_id) const { 54 const std::string& remote_id) const {
51 return model_->BookmarkForRemoteId(remote_id); 55 return model_->BookmarkForRemoteId(remote_id);
52 } 56 }
53 57
54 const std::string BookmarkServerService::RemoteIDForBookmark( 58 const std::string BookmarkServerService::RemoteIDForBookmark(
55 const BookmarkNode* bookmark) const { 59 const BookmarkNode* bookmark) const {
56 return model_->GetRemoteId(bookmark); 60 return model_->GetRemoteId(bookmark);
57 } 61 }
58 62
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 void BookmarkServerService::EnhancedBookmarkModelShuttingDown() { 147 void BookmarkServerService::EnhancedBookmarkModelShuttingDown() {
144 NOTREACHED(); 148 NOTREACHED();
145 } 149 }
146 150
147 SigninManagerBase* BookmarkServerService::GetSigninManager() { 151 SigninManagerBase* BookmarkServerService::GetSigninManager() {
148 DCHECK(signin_manager_); 152 DCHECK(signin_manager_);
149 return signin_manager_; 153 return signin_manager_;
150 } 154 }
151 155
152 } // namespace enhanced_bookmarks 156 } // namespace enhanced_bookmarks
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698