| 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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 | 438 |
| 439 // TODO(rlarocque): Set the enable flag properly when crbug.com/368834 is | 439 // TODO(rlarocque): Set the enable flag properly when crbug.com/368834 is |
| 440 // fixed and we have some way of telling whether or not this type should be | 440 // fixed and we have some way of telling whether or not this type should be |
| 441 // enabled. | 441 // enabled. |
| 442 non_blocking_data_type_manager_.RegisterType(type, false); | 442 non_blocking_data_type_manager_.RegisterType(type, false); |
| 443 } | 443 } |
| 444 | 444 |
| 445 void ProfileSyncService::InitializeNonBlockingType( | 445 void ProfileSyncService::InitializeNonBlockingType( |
| 446 syncer::ModelType type, | 446 syncer::ModelType type, |
| 447 const scoped_refptr<base::SequencedTaskRunner>& task_runner, | 447 const scoped_refptr<base::SequencedTaskRunner>& task_runner, |
| 448 const base::WeakPtr<syncer_v2::ModelTypeSyncProxyImpl>& type_sync_proxy) { | 448 const base::WeakPtr<syncer_v2::ModelTypeProcessorImpl>& type_sync_proxy) { |
| 449 non_blocking_data_type_manager_.InitializeType( | 449 non_blocking_data_type_manager_.InitializeType( |
| 450 type, task_runner, type_sync_proxy); | 450 type, task_runner, type_sync_proxy); |
| 451 } | 451 } |
| 452 | 452 |
| 453 bool ProfileSyncService::IsDataTypeControllerRunning( | 453 bool ProfileSyncService::IsDataTypeControllerRunning( |
| 454 syncer::ModelType type) const { | 454 syncer::ModelType type) const { |
| 455 DataTypeController::TypeMap::const_iterator iter = | 455 DataTypeController::TypeMap::const_iterator iter = |
| 456 directory_data_type_controllers_.find(type); | 456 directory_data_type_controllers_.find(type); |
| 457 if (iter == directory_data_type_controllers_.end()) { | 457 if (iter == directory_data_type_controllers_.end()) { |
| 458 return false; | 458 return false; |
| (...skipping 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2743 } else { | 2743 } else { |
| 2744 UMA_HISTOGRAM_COUNTS("Sync.MemoryPressureWarningBeforeCleanShutdown", | 2744 UMA_HISTOGRAM_COUNTS("Sync.MemoryPressureWarningBeforeCleanShutdown", |
| 2745 warning_received); | 2745 warning_received); |
| 2746 } | 2746 } |
| 2747 } | 2747 } |
| 2748 sync_prefs_.SetMemoryPressureWarningCount(0); | 2748 sync_prefs_.SetMemoryPressureWarningCount(0); |
| 2749 // Will set to true during a clean shutdown, so crash or something else will | 2749 // Will set to true during a clean shutdown, so crash or something else will |
| 2750 // remain this as false. | 2750 // remain this as false. |
| 2751 sync_prefs_.SetCleanShutdown(false); | 2751 sync_prefs_.SetCleanShutdown(false); |
| 2752 } | 2752 } |
| OLD | NEW |