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 "sync/internal_api/sync_manager_impl.h" | 5 #include "sync/internal_api/sync_manager_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1372 syncer::kFullHistorySyncTag) == BaseNode::INIT_OK && | 1372 syncer::kFullHistorySyncTag) == BaseNode::INIT_OK && |
1373 full_history_sync_node.GetExperimentsSpecifics(). | 1373 full_history_sync_node.GetExperimentsSpecifics(). |
1374 history_delete_directives().enabled()) { | 1374 history_delete_directives().enabled()) { |
1375 experiments->full_history_sync = true; | 1375 experiments->full_history_sync = true; |
1376 found_experiment = true; | 1376 found_experiment = true; |
1377 } | 1377 } |
1378 | 1378 |
1379 ReadNode favicon_sync_node(&trans); | 1379 ReadNode favicon_sync_node(&trans); |
1380 if (favicon_sync_node.InitByClientTagLookup( | 1380 if (favicon_sync_node.InitByClientTagLookup( |
1381 syncer::EXPERIMENTS, | 1381 syncer::EXPERIMENTS, |
1382 syncer::kFaviconSyncTag) == BaseNode::INIT_OK && | 1382 syncer::kFaviconSyncTag) == BaseNode::INIT_OK) { |
1383 favicon_sync_node.GetExperimentsSpecifics().favicon_sync().enabled()) { | 1383 experiments->favicon_sync = favicon_sync_node.GetExperimentsSpecifics(). |
1384 experiments->favicon_sync = true; | 1384 favicon_sync().enabled(); |
| 1385 experiments->favicon_sync_limit = |
| 1386 favicon_sync_node.GetExperimentsSpecifics().favicon_sync(). |
| 1387 favicon_sync_limit(); |
1385 found_experiment = true; | 1388 found_experiment = true; |
1386 } | 1389 } |
1387 | 1390 |
1388 return found_experiment; | 1391 return found_experiment; |
1389 } | 1392 } |
1390 | 1393 |
1391 bool SyncManagerImpl::HasUnsyncedItems() { | 1394 bool SyncManagerImpl::HasUnsyncedItems() { |
1392 ReadTransaction trans(FROM_HERE, GetUserShare()); | 1395 ReadTransaction trans(FROM_HERE, GetUserShare()); |
1393 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); | 1396 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); |
1394 } | 1397 } |
1395 | 1398 |
1396 SyncEncryptionHandler* SyncManagerImpl::GetEncryptionHandler() { | 1399 SyncEncryptionHandler* SyncManagerImpl::GetEncryptionHandler() { |
1397 return sync_encryption_handler_.get(); | 1400 return sync_encryption_handler_.get(); |
1398 } | 1401 } |
1399 | 1402 |
1400 // static. | 1403 // static. |
1401 int SyncManagerImpl::GetDefaultNudgeDelay() { | 1404 int SyncManagerImpl::GetDefaultNudgeDelay() { |
1402 return kDefaultNudgeDelayMilliseconds; | 1405 return kDefaultNudgeDelayMilliseconds; |
1403 } | 1406 } |
1404 | 1407 |
1405 // static. | 1408 // static. |
1406 int SyncManagerImpl::GetPreferencesNudgeDelay() { | 1409 int SyncManagerImpl::GetPreferencesNudgeDelay() { |
1407 return kPreferencesNudgeDelayMilliseconds; | 1410 return kPreferencesNudgeDelayMilliseconds; |
1408 } | 1411 } |
1409 | 1412 |
1410 } // namespace syncer | 1413 } // namespace syncer |
OLD | NEW |