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

Side by Side Diff: components/sync/syncable/write_transaction_info.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 "components/sync/syncable/write_transaction_info.h" 5 #include "components/sync/syncable/write_transaction_info.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 23 matching lines...) Expand all
34 size_t max_mutations_size) const { 34 size_t max_mutations_size) const {
35 base::DictionaryValue* dict = new base::DictionaryValue(); 35 base::DictionaryValue* dict = new base::DictionaryValue();
36 dict->SetString("id", base::Int64ToString(id)); 36 dict->SetString("id", base::Int64ToString(id));
37 dict->SetString("location", location_string); 37 dict->SetString("location", location_string);
38 dict->SetString("writer", WriterTagToString(writer)); 38 dict->SetString("writer", WriterTagToString(writer));
39 std::unique_ptr<base::Value> mutations_value; 39 std::unique_ptr<base::Value> mutations_value;
40 const size_t mutations_size = mutations.Get().size(); 40 const size_t mutations_size = mutations.Get().size();
41 if (mutations_size <= max_mutations_size) { 41 if (mutations_size <= max_mutations_size) {
42 mutations_value = EntryKernelMutationMapToValue(mutations.Get()); 42 mutations_value = EntryKernelMutationMapToValue(mutations.Get());
43 } else { 43 } else {
44 mutations_value = base::MakeUnique<base::StringValue>( 44 mutations_value = base::MakeUnique<base::Value>(
45 base::SizeTToString(mutations_size) + " mutations"); 45 base::SizeTToString(mutations_size) + " mutations");
46 } 46 }
47 dict->Set("mutations", std::move(mutations_value)); 47 dict->Set("mutations", std::move(mutations_value));
48 return dict; 48 return dict;
49 } 49 }
50 50
51 } // namespace syncable 51 } // namespace syncable
52 } // namespace syncer 52 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/syncable/syncable_id.cc ('k') | components/sync/test/fake_server/fake_server_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698