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

Side by Side Diff: chrome/browser/enhanced_bookmarks/chrome_bookmark_server_cluster_service.cc

Issue 539173004: Bring up of the enhanced bookmarks cluster service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@intermediary2
Patch Set: Removing empty DEPS file, fixing a nit. 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/enhanced_bookmarks/chrome_bookmark_server_cluster_servi ce.h"
6
7 #include "chrome/browser/sync/profile_sync_service.h"
8 #include "components/bookmarks/browser/bookmark_model.h"
9
10 namespace enhanced_bookmarks {
11
12 ChromeBookmarkServerClusterService::ChromeBookmarkServerClusterService(
13 const std::string& application_language_code,
14 scoped_refptr<net::URLRequestContextGetter> request_context_getter,
15 ProfileOAuth2TokenService* token_service,
16 SigninManagerBase* signin_manager,
17 BookmarkModel* bookmark_model,
18 PrefService* pref_service,
19 ProfileSyncService* sync_service)
20 : BookmarkServerClusterService(application_language_code,
21 request_context_getter,
22 token_service,
23 signin_manager,
24 bookmark_model,
25 pref_service),
26 sync_service_(sync_service) {
27 if (sync_service_)
28 sync_service_->AddObserver(this);
29 }
30
31 ChromeBookmarkServerClusterService::~ChromeBookmarkServerClusterService() {
32 if (sync_service_)
33 sync_service_->RemoveObserver(this);
34 }
35
36 void ChromeBookmarkServerClusterService::OnStateChanged() {
37 // Do nothing.
38 }
39
40 void ChromeBookmarkServerClusterService::OnSyncCycleCompleted() {
Yaron 2014/09/05 05:18:00 This seems a bit aggressive. I think sync cycles a
noyau (Ping after 24h) 2014/09/10 08:53:56 This class originally used the model notification,
41 if (bookmark_model_->loaded())
42 TriggerTokenRequest(false);
43 }
44 } // namespace enhanced_bookmarks
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698