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

Side by Side Diff: chrome/browser/sync/api/sync_change.cc

Issue 7566036: Implement SyncableServices in TemplateURLService. Add related unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Recommitting patch. Repaired memory leaks and adjusted unittests to reflect changes. Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
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/api/sync_change.h" 5 #include "chrome/browser/sync/api/sync_change.h"
6 6
7 SyncChange::SyncChange() : change_type_(ACTION_INVALID) { 7 SyncChange::SyncChange() : change_type_(ACTION_INVALID) {
8 } 8 }
9 9
10 SyncChange::SyncChange(SyncChangeType change_type, const SyncData& sync_data) 10 SyncChange::SyncChange(SyncChangeType change_type, const SyncData& sync_data)
(...skipping 24 matching lines...) Expand all
35 return true; 35 return true;
36 } 36 }
37 37
38 SyncChange::SyncChangeType SyncChange::change_type() const { 38 SyncChange::SyncChangeType SyncChange::change_type() const {
39 return change_type_; 39 return change_type_;
40 } 40 }
41 41
42 SyncData SyncChange::sync_data() const { 42 SyncData SyncChange::sync_data() const {
43 return sync_data_; 43 return sync_data_;
44 } 44 }
45
46 // static
47 std::string SyncChange::ChangeTypeToString(SyncChangeType change_type) {
48 switch (change_type) {
49 case ACTION_INVALID:
50 return "ACTION_INVALID";
51 case ACTION_ADD:
52 return "ACTION_ADD";
53 case ACTION_UPDATE:
54 return "ACTION_UPDATE";
55 case ACTION_DELETE:
56 return "ACTION_DELETE";
57 default:
58 NOTREACHED();
59 }
60 return std::string();
61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698