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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 13991017: Commit InvalidationService implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another attempt to fix Android Created 7 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/sync/glue/sync_backend_host.h" 7 #include "chrome/browser/sync/glue/sync_backend_host.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/file_util.h" 15 #include "base/file_util.h"
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
17 #include "base/location.h" 17 #include "base/location.h"
18 #include "base/metrics/histogram.h" 18 #include "base/metrics/histogram.h"
19 #include "base/threading/thread_restrictions.h" 19 #include "base/threading/thread_restrictions.h"
20 #include "base/timer.h" 20 #include "base/timer.h"
21 #include "base/tracked_objects.h" 21 #include "base/tracked_objects.h"
22 #include "base/utf_string_conversions.h" 22 #include "base/utf_string_conversions.h"
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "chrome/browser/invalidation/invalidator_storage.h"
24 #include "chrome/browser/net/network_time_tracker.h" 25 #include "chrome/browser/net/network_time_tracker.h"
25 #include "chrome/browser/profiles/profile.h" 26 #include "chrome/browser/profiles/profile.h"
26 #include "chrome/browser/signin/token_service.h" 27 #include "chrome/browser/signin/token_service.h"
27 #include "chrome/browser/signin/token_service_factory.h" 28 #include "chrome/browser/signin/token_service_factory.h"
28 #include "chrome/browser/sync/glue/android_invalidator_bridge.h" 29 #include "chrome/browser/sync/glue/android_invalidator_bridge.h"
29 #include "chrome/browser/sync/glue/android_invalidator_bridge_proxy.h" 30 #include "chrome/browser/sync/glue/android_invalidator_bridge_proxy.h"
30 #include "chrome/browser/sync/glue/change_processor.h" 31 #include "chrome/browser/sync/glue/change_processor.h"
31 #include "chrome/browser/sync/glue/chrome_encryptor.h" 32 #include "chrome/browser/sync/glue/chrome_encryptor.h"
32 #include "chrome/browser/sync/glue/device_info.h" 33 #include "chrome/browser/sync/glue/device_info.h"
33 #include "chrome/browser/sync/glue/sync_backend_registrar.h" 34 #include "chrome/browser/sync/glue/sync_backend_registrar.h"
34 #include "chrome/browser/sync/glue/synced_device_tracker.h" 35 #include "chrome/browser/sync/glue/synced_device_tracker.h"
35 #include "chrome/browser/sync/invalidations/invalidator_storage.h"
36 #include "chrome/browser/sync/sync_prefs.h" 36 #include "chrome/browser/sync/sync_prefs.h"
37 #include "chrome/common/chrome_notification_types.h" 37 #include "chrome/common/chrome_notification_types.h"
38 #include "chrome/common/chrome_notification_types.h" 38 #include "chrome/common/chrome_notification_types.h"
39 #include "chrome/common/chrome_switches.h" 39 #include "chrome/common/chrome_switches.h"
40 #include "chrome/common/chrome_version_info.h" 40 #include "chrome/common/chrome_version_info.h"
41 #include "content/public/browser/browser_thread.h" 41 #include "content/public/browser/browser_thread.h"
42 #include "content/public/browser/notification_details.h" 42 #include "content/public/browser/notification_details.h"
43 #include "content/public/browser/notification_service.h" 43 #include "content/public/browser/notification_service.h"
44 #include "content/public/browser/notification_source.h" 44 #include "content/public/browser/notification_source.h"
45 #include "content/public/common/content_client.h" 45 #include "content/public/common/content_client.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 return notifier_options; 342 return notifier_options;
343 } 343 }
344 344
345 } // namespace 345 } // namespace
346 346
347 SyncBackendHost::SyncBackendHost( 347 SyncBackendHost::SyncBackendHost(
348 const std::string& name, 348 const std::string& name,
349 Profile* profile, 349 Profile* profile,
350 const base::WeakPtr<SyncPrefs>& sync_prefs, 350 const base::WeakPtr<SyncPrefs>& sync_prefs,
351 const base::WeakPtr<InvalidatorStorage>& invalidator_storage) 351 const base::WeakPtr<invalidation::InvalidatorStorage>& invalidator_storage)
352 : weak_ptr_factory_(this), 352 : weak_ptr_factory_(this),
353 sync_thread_("Chrome_SyncThread"), 353 sync_thread_("Chrome_SyncThread"),
354 frontend_loop_(MessageLoop::current()), 354 frontend_loop_(MessageLoop::current()),
355 profile_(profile), 355 profile_(profile),
356 name_(name), 356 name_(name),
357 core_(new Core(name, profile_->GetPath().Append(kSyncDataFolderName), 357 core_(new Core(name, profile_->GetPath().Append(kSyncDataFolderName),
358 weak_ptr_factory_.GetWeakPtr())), 358 weak_ptr_factory_.GetWeakPtr())),
359 initialization_state_(NOT_ATTEMPTED), 359 initialization_state_(NOT_ATTEMPTED),
360 sync_prefs_(sync_prefs), 360 sync_prefs_(sync_prefs),
361 invalidator_factory_( 361 invalidator_factory_(
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 DVLOG(1) << "Connection status changed: " 1667 DVLOG(1) << "Connection status changed: "
1668 << syncer::ConnectionStatusToString(status); 1668 << syncer::ConnectionStatusToString(status);
1669 frontend_->OnConnectionStatusChange(status); 1669 frontend_->OnConnectionStatusChange(status);
1670 } 1670 }
1671 1671
1672 #undef SDVLOG 1672 #undef SDVLOG
1673 1673
1674 #undef SLOG 1674 #undef SLOG
1675 1675
1676 } // namespace browser_sync 1676 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698