| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/public/model_type_store_backend.h" | 5 #include "components/sync/core/model_type_store_backend.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "third_party/leveldatabase/env_chromium.h" | 11 #include "third_party/leveldatabase/env_chromium.h" |
| 12 #include "third_party/leveldatabase/src/helpers/memenv/memenv.h" | 12 #include "third_party/leveldatabase/src/helpers/memenv/memenv.h" |
| 13 #include "third_party/leveldatabase/src/include/leveldb/db.h" | 13 #include "third_party/leveldatabase/src/include/leveldb/db.h" |
| 14 #include "third_party/leveldatabase/src/include/leveldb/env.h" | 14 #include "third_party/leveldatabase/src/include/leveldb/env.h" |
| 15 #include "third_party/leveldatabase/src/include/leveldb/iterator.h" | 15 #include "third_party/leveldatabase/src/include/leveldb/iterator.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 std::unique_ptr<leveldb::WriteBatch> write_batch) { | 136 std::unique_ptr<leveldb::WriteBatch> write_batch) { |
| 137 DFAKE_SCOPED_LOCK(push_pop_); | 137 DFAKE_SCOPED_LOCK(push_pop_); |
| 138 DCHECK(db_); | 138 DCHECK(db_); |
| 139 leveldb::Status status = | 139 leveldb::Status status = |
| 140 db_->Write(leveldb::WriteOptions(), write_batch.get()); | 140 db_->Write(leveldb::WriteOptions(), write_batch.get()); |
| 141 return status.ok() ? ModelTypeStore::Result::SUCCESS | 141 return status.ok() ? ModelTypeStore::Result::SUCCESS |
| 142 : ModelTypeStore::Result::UNSPECIFIED_ERROR; | 142 : ModelTypeStore::Result::UNSPECIFIED_ERROR; |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace syncer_v2 | 145 } // namespace syncer_v2 |
| OLD | NEW |