OLD | NEW |
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_path.h" | 15 #include "base/file_path.h" |
16 #include "base/file_util.h" | 16 #include "base/file_util.h" |
17 #include "base/location.h" | 17 #include "base/location.h" |
18 #include "base/threading/sequenced_worker_pool.h" | 18 #include "base/threading/sequenced_worker_pool.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 "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/browser/signin/token_service.h" | 24 #include "chrome/browser/signin/token_service.h" |
25 #include "chrome/browser/sync/glue/bridged_sync_notifier.h" | 25 #include "chrome/browser/sync/glue/bridged_sync_notifier.h" |
26 #include "chrome/browser/sync/glue/change_processor.h" | 26 #include "chrome/browser/sync/glue/change_processor.h" |
27 #include "chrome/browser/sync/glue/chrome_encryptor.h" | 27 #include "chrome/browser/sync/glue/chrome_encryptor.h" |
28 #include "chrome/browser/sync/glue/http_bridge.h" | 28 #include "chrome/browser/sync/glue/http_bridge.h" |
29 #include "chrome/browser/sync/glue/sync_backend_registrar.h" | 29 #include "chrome/browser/sync/glue/sync_backend_registrar.h" |
30 #include "chrome/browser/sync/internal_api/base_transaction.h" | |
31 #include "chrome/browser/sync/internal_api/read_transaction.h" | |
32 #include "chrome/browser/sync/sync_prefs.h" | 30 #include "chrome/browser/sync/sync_prefs.h" |
33 #include "chrome/common/chrome_notification_types.h" | 31 #include "chrome/common/chrome_notification_types.h" |
34 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
35 #include "chrome/common/chrome_version_info.h" | 33 #include "chrome/common/chrome_version_info.h" |
36 #include "chrome/common/net/gaia/gaia_constants.h" | 34 #include "chrome/common/net/gaia/gaia_constants.h" |
37 #include "content/public/browser/browser_thread.h" | 35 #include "content/public/browser/browser_thread.h" |
38 #include "content/public/browser/notification_service.h" | 36 #include "content/public/browser/notification_service.h" |
39 #include "content/public/common/content_client.h" | 37 #include "content/public/common/content_client.h" |
40 #include "jingle/notifier/base/notification_method.h" | 38 #include "jingle/notifier/base/notification_method.h" |
41 #include "jingle/notifier/base/notifier_options.h" | 39 #include "jingle/notifier/base/notifier_options.h" |
42 #include "net/base/host_port_pair.h" | 40 #include "net/base/host_port_pair.h" |
43 #include "net/url_request/url_request_context_getter.h" | 41 #include "net/url_request/url_request_context_getter.h" |
44 #include "sync/engine/model_safe_worker.h" | 42 #include "sync/engine/model_safe_worker.h" |
| 43 #include "sync/internal_api/base_transaction.h" |
| 44 #include "sync/internal_api/read_transaction.h" |
45 #include "sync/notifier/sync_notifier.h" | 45 #include "sync/notifier/sync_notifier.h" |
46 #include "sync/protocol/encryption.pb.h" | 46 #include "sync/protocol/encryption.pb.h" |
47 #include "sync/protocol/sync.pb.h" | 47 #include "sync/protocol/sync.pb.h" |
48 #include "sync/sessions/session_state.h" | 48 #include "sync/sessions/session_state.h" |
49 #include "sync/util/nigori.h" | 49 #include "sync/util/nigori.h" |
50 | 50 |
51 static const int kSaveChangesIntervalSeconds = 10; | 51 static const int kSaveChangesIntervalSeconds = 10; |
52 static const FilePath::CharType kSyncDataFolderName[] = | 52 static const FilePath::CharType kSyncDataFolderName[] = |
53 FILE_PATH_LITERAL("Sync Data"); | 53 FILE_PATH_LITERAL("Sync Data"); |
54 | 54 |
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1425 FROM_HERE, | 1425 FROM_HERE, |
1426 base::Bind(&SyncBackendHost::Core::DoRefreshNigori, | 1426 base::Bind(&SyncBackendHost::Core::DoRefreshNigori, |
1427 core_.get(), sync_thread_done_callback)); | 1427 core_.get(), sync_thread_done_callback)); |
1428 } | 1428 } |
1429 | 1429 |
1430 #undef SDVLOG | 1430 #undef SDVLOG |
1431 | 1431 |
1432 #undef SLOG | 1432 #undef SLOG |
1433 | 1433 |
1434 } // namespace browser_sync | 1434 } // namespace browser_sync |
OLD | NEW |