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

Side by Side Diff: components/sync/test/fake_server/bookmark_entity_builder.cc

Issue 2427803002: [Sync] Replacing NULL with nullptr in code and null in comments for components/sync/ (Closed)
Patch Set: Fixing start of sentence capitlization. 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/test/fake_server/bookmark_entity_builder.h" 5 #include "components/sync/test/fake_server/bookmark_entity_builder.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 29 matching lines...) Expand all
40 40
41 BookmarkEntityBuilder::~BookmarkEntityBuilder() {} 41 BookmarkEntityBuilder::~BookmarkEntityBuilder() {}
42 42
43 void BookmarkEntityBuilder::SetParentId(const std::string& parent_id) { 43 void BookmarkEntityBuilder::SetParentId(const std::string& parent_id) {
44 parent_id_ = parent_id; 44 parent_id_ = parent_id;
45 } 45 }
46 46
47 std::unique_ptr<FakeServerEntity> BookmarkEntityBuilder::BuildBookmark( 47 std::unique_ptr<FakeServerEntity> BookmarkEntityBuilder::BuildBookmark(
48 const GURL& url) { 48 const GURL& url) {
49 if (!url.is_valid()) { 49 if (!url.is_valid()) {
50 return base::WrapUnique<FakeServerEntity>(NULL); 50 return base::WrapUnique<FakeServerEntity>(nullptr);
51 } 51 }
52 52
53 sync_pb::EntitySpecifics entity_specifics = CreateBaseEntitySpecifics(); 53 sync_pb::EntitySpecifics entity_specifics = CreateBaseEntitySpecifics();
54 entity_specifics.mutable_bookmark()->set_url(url.spec()); 54 entity_specifics.mutable_bookmark()->set_url(url.spec());
55 const bool kIsNotFolder = false; 55 const bool kIsNotFolder = false;
56 return Build(entity_specifics, kIsNotFolder); 56 return Build(entity_specifics, kIsNotFolder);
57 } 57 }
58 58
59 std::unique_ptr<FakeServerEntity> BookmarkEntityBuilder::BuildFolder() { 59 std::unique_ptr<FakeServerEntity> BookmarkEntityBuilder::BuildFolder() {
60 const bool kIsFolder = true; 60 const bool kIsFolder = true;
(...skipping 26 matching lines...) Expand all
87 const string id = 87 const string id =
88 FakeServerEntity::CreateId(syncer::BOOKMARKS, base::GenerateGUID()); 88 FakeServerEntity::CreateId(syncer::BOOKMARKS, base::GenerateGUID());
89 89
90 return base::WrapUnique<FakeServerEntity>(new BookmarkEntity( 90 return base::WrapUnique<FakeServerEntity>(new BookmarkEntity(
91 id, kUnusedVersion, title_, originator_cache_guid_, 91 id, kUnusedVersion, title_, originator_cache_guid_,
92 originator_client_item_id_, unique_position, entity_specifics, is_folder, 92 originator_client_item_id_, unique_position, entity_specifics, is_folder,
93 parent_id_, kDefaultTime, kDefaultTime)); 93 parent_id_, kDefaultTime, kDefaultTime));
94 } 94 }
95 95
96 } // namespace fake_server 96 } // namespace fake_server
OLDNEW
« no previous file with comments | « components/sync/test/fake_server/android/fake_server_helper_android.cc ('k') | components/sync/test/fake_server/fake_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698