| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/engine/model_safe_worker.h" | 5 #include "chrome/browser/sync/engine/model_safe_worker.h" |
| 6 #include "chrome/browser/sync/util/unrecoverable_error_info.h" | 6 #include "chrome/browser/sync/util/unrecoverable_error_info.h" |
| 7 | 7 |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 case GROUP_PASSIVE: | 64 case GROUP_PASSIVE: |
| 65 return "GROUP_PASSIVE"; | 65 return "GROUP_PASSIVE"; |
| 66 case GROUP_PASSWORD: | 66 case GROUP_PASSWORD: |
| 67 return "GROUP_PASSWORD"; | 67 return "GROUP_PASSWORD"; |
| 68 default: | 68 default: |
| 69 NOTREACHED(); | 69 NOTREACHED(); |
| 70 return "INVALID"; | 70 return "INVALID"; |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 | 73 |
| 74 ModelSafeWorker::ModelSafeWorker() {} | |
| 75 | |
| 76 ModelSafeWorker::~ModelSafeWorker() {} | 74 ModelSafeWorker::~ModelSafeWorker() {} |
| 77 | 75 |
| 78 UnrecoverableErrorInfo ModelSafeWorker::DoWorkAndWaitUntilDone( | |
| 79 const WorkCallback& work) { | |
| 80 // For GROUP_PASSIVE, we do the work on the current thread. | |
| 81 return work.Run(); | |
| 82 } | |
| 83 | |
| 84 ModelSafeGroup ModelSafeWorker::GetModelSafeGroup() { | |
| 85 return GROUP_PASSIVE; | |
| 86 } | |
| 87 | |
| 88 } // namespace browser_sync | 76 } // namespace browser_sync |
| OLD | NEW |