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

Side by Side Diff: sync/syncable/entry.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
« no previous file with comments | « sync/protocol/sync_protocol_error.cc ('k') | sync/syncable/entry_kernel.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/syncable/entry.h" 5 #include "sync/syncable/entry.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "base/json/string_escape.h" 9 #include "base/json/string_escape.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 24 matching lines...) Expand all
35 35
36 Entry::Entry(BaseTransaction* trans, GetByHandle, int64 metahandle) 36 Entry::Entry(BaseTransaction* trans, GetByHandle, int64 metahandle)
37 : basetrans_(trans) { 37 : basetrans_(trans) {
38 kernel_ = trans->directory()->GetEntryByHandle(metahandle); 38 kernel_ = trans->directory()->GetEntryByHandle(metahandle);
39 } 39 }
40 40
41 Directory* Entry::dir() const { 41 Directory* Entry::dir() const {
42 return basetrans_->directory(); 42 return basetrans_->directory();
43 } 43 }
44 44
45 DictionaryValue* Entry::ToValue(Cryptographer* cryptographer) const { 45 base::DictionaryValue* Entry::ToValue(Cryptographer* cryptographer) const {
46 DictionaryValue* entry_info = new DictionaryValue(); 46 base::DictionaryValue* entry_info = new base::DictionaryValue();
47 entry_info->SetBoolean("good", good()); 47 entry_info->SetBoolean("good", good());
48 if (good()) { 48 if (good()) {
49 entry_info->Set("kernel", kernel_->ToValue(cryptographer)); 49 entry_info->Set("kernel", kernel_->ToValue(cryptographer));
50 entry_info->Set("modelType", 50 entry_info->Set("modelType",
51 ModelTypeToValue(GetModelType())); 51 ModelTypeToValue(GetModelType()));
52 entry_info->SetBoolean("existsOnClientBecauseNameIsNonEmpty", 52 entry_info->SetBoolean("existsOnClientBecauseNameIsNonEmpty",
53 ExistsOnClientBecauseNameIsNonEmpty()); 53 ExistsOnClientBecauseNameIsNonEmpty());
54 entry_info->SetBoolean("isRoot", IsRoot()); 54 entry_info->SetBoolean("isRoot", IsRoot());
55 } 55 }
56 return entry_info; 56 return entry_info;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 os << "TempFlags: "; 167 os << "TempFlags: ";
168 for ( ; i < BIT_TEMPS_END; ++i) { 168 for ( ; i < BIT_TEMPS_END; ++i) {
169 if (kernel->ref(static_cast<BitTemp>(i))) 169 if (kernel->ref(static_cast<BitTemp>(i)))
170 os << "#" << i - BIT_TEMPS_BEGIN << ", "; 170 os << "#" << i - BIT_TEMPS_BEGIN << ", ";
171 } 171 }
172 return os; 172 return os;
173 } 173 }
174 174
175 } // namespace syncable 175 } // namespace syncable
176 } // namespace syncer 176 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/protocol/sync_protocol_error.cc ('k') | sync/syncable/entry_kernel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698