| 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/glue/generic_change_processor.h" | 5 #include "chrome/browser/sync/glue/generic_change_processor.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 } | 160 } |
| 161 | 161 |
| 162 syncer::SyncDataList GenericChangeProcessor::GetAllSyncData( | 162 syncer::SyncDataList GenericChangeProcessor::GetAllSyncData( |
| 163 syncer::ModelType type) const { | 163 syncer::ModelType type) const { |
| 164 // This is slow / memory intensive. Should be used sparingly by datatypes. | 164 // This is slow / memory intensive. Should be used sparingly by datatypes. |
| 165 syncer::SyncDataList data; | 165 syncer::SyncDataList data; |
| 166 GetAllSyncDataReturnError(type, &data); | 166 GetAllSyncDataReturnError(type, &data); |
| 167 return data; | 167 return data; |
| 168 } | 168 } |
| 169 | 169 |
| 170 syncer::SyncError GenericChangeProcessor::UpdateDataTypeContext( |
| 171 syncer::ModelType type, |
| 172 const std::string& context) { |
| 173 NOTIMPLEMENTED(); |
| 174 return syncer::SyncError(); |
| 175 } |
| 176 |
| 170 syncer::SyncError GenericChangeProcessor::GetAllSyncDataReturnError( | 177 syncer::SyncError GenericChangeProcessor::GetAllSyncDataReturnError( |
| 171 syncer::ModelType type, | 178 syncer::ModelType type, |
| 172 syncer::SyncDataList* current_sync_data) const { | 179 syncer::SyncDataList* current_sync_data) const { |
| 173 DCHECK(CalledOnValidThread()); | 180 DCHECK(CalledOnValidThread()); |
| 174 std::string type_name = syncer::ModelTypeToString(type); | 181 std::string type_name = syncer::ModelTypeToString(type); |
| 175 syncer::ReadTransaction trans(FROM_HERE, share_handle()); | 182 syncer::ReadTransaction trans(FROM_HERE, share_handle()); |
| 176 syncer::ReadNode root(&trans); | 183 syncer::ReadNode root(&trans); |
| 177 if (root.InitByTagLookup(syncer::ModelTypeToRootTag(type)) != | 184 if (root.InitByTagLookup(syncer::ModelTypeToRootTag(type)) != |
| 178 syncer::BaseNode::INIT_OK) { | 185 syncer::BaseNode::INIT_OK) { |
| 179 syncer::SyncError error(FROM_HERE, | 186 syncer::SyncError error(FROM_HERE, |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 void GenericChangeProcessor::StartImpl(Profile* profile) { | 624 void GenericChangeProcessor::StartImpl(Profile* profile) { |
| 618 DCHECK(CalledOnValidThread()); | 625 DCHECK(CalledOnValidThread()); |
| 619 } | 626 } |
| 620 | 627 |
| 621 syncer::UserShare* GenericChangeProcessor::share_handle() const { | 628 syncer::UserShare* GenericChangeProcessor::share_handle() const { |
| 622 DCHECK(CalledOnValidThread()); | 629 DCHECK(CalledOnValidThread()); |
| 623 return share_handle_; | 630 return share_handle_; |
| 624 } | 631 } |
| 625 | 632 |
| 626 } // namespace browser_sync | 633 } // namespace browser_sync |
| OLD | NEW |