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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 425 |
426 // TODO(rlarocque): Set the enable flag properly when crbug.com/368834 is | 426 // TODO(rlarocque): Set the enable flag properly when crbug.com/368834 is |
427 // fixed and we have some way of telling whether or not this type should be | 427 // fixed and we have some way of telling whether or not this type should be |
428 // enabled. | 428 // enabled. |
429 non_blocking_data_type_manager_.RegisterType(type, false); | 429 non_blocking_data_type_manager_.RegisterType(type, false); |
430 } | 430 } |
431 | 431 |
432 void ProfileSyncService::InitializeNonBlockingType( | 432 void ProfileSyncService::InitializeNonBlockingType( |
433 syncer::ModelType type, | 433 syncer::ModelType type, |
434 const scoped_refptr<base::SequencedTaskRunner>& task_runner, | 434 const scoped_refptr<base::SequencedTaskRunner>& task_runner, |
435 const base::WeakPtr<syncer::ModelTypeSyncProxyImpl>& type_sync_proxy) { | 435 const base::WeakPtr<syncer_v2::ModelTypeSyncProxyImpl>& type_sync_proxy) { |
436 non_blocking_data_type_manager_.InitializeType( | 436 non_blocking_data_type_manager_.InitializeType( |
437 type, task_runner, type_sync_proxy); | 437 type, task_runner, type_sync_proxy); |
438 } | 438 } |
439 | 439 |
440 bool ProfileSyncService::IsDataTypeControllerRunning( | 440 bool ProfileSyncService::IsDataTypeControllerRunning( |
441 syncer::ModelType type) const { | 441 syncer::ModelType type) const { |
442 DataTypeController::TypeMap::const_iterator iter = | 442 DataTypeController::TypeMap::const_iterator iter = |
443 directory_data_type_controllers_.find(type); | 443 directory_data_type_controllers_.find(type); |
444 if (iter == directory_data_type_controllers_.end()) { | 444 if (iter == directory_data_type_controllers_.end()) { |
445 return false; | 445 return false; |
(...skipping 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2719 } else { | 2719 } else { |
2720 UMA_HISTOGRAM_COUNTS("Sync.MemoryPressureWarningBeforeCleanShutdown", | 2720 UMA_HISTOGRAM_COUNTS("Sync.MemoryPressureWarningBeforeCleanShutdown", |
2721 warning_received); | 2721 warning_received); |
2722 } | 2722 } |
2723 } | 2723 } |
2724 sync_prefs_.SetMemoryPressureWarningCount(0); | 2724 sync_prefs_.SetMemoryPressureWarningCount(0); |
2725 // Will set to true during a clean shutdown, so crash or something else will | 2725 // Will set to true during a clean shutdown, so crash or something else will |
2726 // remain this as false. | 2726 // remain this as false. |
2727 sync_prefs_.SetCleanShutdown(false); | 2727 sync_prefs_.SetCleanShutdown(false); |
2728 } | 2728 } |
OLD | NEW |