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

Side by Side Diff: sync/internal_api/change_record.cc

Issue 17034006: Add base namespace to more values in sync and elsewhere. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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) 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 "sync/internal_api/public/change_record.h" 5 #include "sync/internal_api/public/change_record.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "sync/internal_api/public/base_node.h" 9 #include "sync/internal_api/public/base_node.h"
10 #include "sync/internal_api/public/read_node.h" 10 #include "sync/internal_api/public/read_node.h"
11 #include "sync/protocol/proto_value_conversions.h" 11 #include "sync/protocol/proto_value_conversions.h"
12 12
13 namespace syncer { 13 namespace syncer {
14 14
15 ChangeRecord::ChangeRecord() 15 ChangeRecord::ChangeRecord()
16 : id(kInvalidId), action(ACTION_ADD) {} 16 : id(kInvalidId), action(ACTION_ADD) {}
17 17
18 ChangeRecord::~ChangeRecord() {} 18 ChangeRecord::~ChangeRecord() {}
19 19
20 DictionaryValue* ChangeRecord::ToValue() const { 20 base::DictionaryValue* ChangeRecord::ToValue() const {
21 DictionaryValue* value = new DictionaryValue(); 21 base::DictionaryValue* value = new base::DictionaryValue();
22 std::string action_str; 22 std::string action_str;
23 switch (action) { 23 switch (action) {
24 case ACTION_ADD: 24 case ACTION_ADD:
25 action_str = "Add"; 25 action_str = "Add";
26 break; 26 break;
27 case ACTION_DELETE: 27 case ACTION_DELETE:
28 action_str = "Delete"; 28 action_str = "Delete";
29 break; 29 break;
30 case ACTION_UPDATE: 30 case ACTION_UPDATE:
31 action_str = "Update"; 31 action_str = "Update";
(...skipping 16 matching lines...) Expand all
48 48
49 ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData() {} 49 ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData() {}
50 50
51 ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData( 51 ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData(
52 const sync_pb::PasswordSpecificsData& data) 52 const sync_pb::PasswordSpecificsData& data)
53 : unencrypted_(data) { 53 : unencrypted_(data) {
54 } 54 }
55 55
56 ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {} 56 ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {}
57 57
58 DictionaryValue* ExtraPasswordChangeRecordData::ToValue() const { 58 base::DictionaryValue* ExtraPasswordChangeRecordData::ToValue() const {
59 return PasswordSpecificsDataToValue(unencrypted_); 59 return PasswordSpecificsDataToValue(unencrypted_);
60 } 60 }
61 61
62 const sync_pb::PasswordSpecificsData& 62 const sync_pb::PasswordSpecificsData&
63 ExtraPasswordChangeRecordData::unencrypted() const { 63 ExtraPasswordChangeRecordData::unencrypted() const {
64 return unencrypted_; 64 return unencrypted_;
65 } 65 }
66 66
67 } // namespace syncer 67 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/base_node.cc ('k') | sync/internal_api/js_mutation_event_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698