Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Side by Side Diff: components/sync/api/conflict_resolution.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/sync/api/conflict_resolution.h ('k') | components/sync/api/data_batch.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/sync/api/conflict_resolution.h" 5 #include "components/sync/api/conflict_resolution.h"
6 6
7 namespace syncer { 7 namespace syncer_v2 {
8 8
9 // static 9 // static
10 ConflictResolution ConflictResolution::UseLocal() { 10 ConflictResolution ConflictResolution::UseLocal() {
11 return ConflictResolution(USE_LOCAL, nullptr); 11 return ConflictResolution(USE_LOCAL, nullptr);
12 } 12 }
13 13
14 // static 14 // static
15 ConflictResolution ConflictResolution::UseRemote() { 15 ConflictResolution ConflictResolution::UseRemote() {
16 return ConflictResolution(USE_REMOTE, nullptr); 16 return ConflictResolution(USE_REMOTE, nullptr);
17 } 17 }
(...skipping 13 matching lines...) Expand all
31 std::unique_ptr<EntityData> ConflictResolution::ExtractData() { 31 std::unique_ptr<EntityData> ConflictResolution::ExtractData() {
32 // Has data if and only if type is USE_NEW. 32 // Has data if and only if type is USE_NEW.
33 DCHECK((type_ == USE_NEW) == !!data_); 33 DCHECK((type_ == USE_NEW) == !!data_);
34 return std::move(data_); 34 return std::move(data_);
35 }; 35 };
36 36
37 ConflictResolution::ConflictResolution(Type type, 37 ConflictResolution::ConflictResolution(Type type,
38 std::unique_ptr<EntityData> data) 38 std::unique_ptr<EntityData> data)
39 : type_(type), data_(std::move(data)) {} 39 : type_(type), data_(std::move(data)) {}
40 40
41 } // namespace syncer 41 } // namespace syncer_v2
OLDNEW
« no previous file with comments | « components/sync/api/conflict_resolution.h ('k') | components/sync/api/data_batch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698