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

Side by Side Diff: components/sync/device_info/device_info_sync_service.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/device_info/device_info_sync_service.h" 5 #include "components/sync/device_info/device_info_sync_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 28 matching lines...) Expand all
39 39
40 DCHECK(!IsSyncing()); 40 DCHECK(!IsSyncing());
41 41
42 sync_processor_ = std::move(sync_processor); 42 sync_processor_ = std::move(sync_processor);
43 error_handler_ = std::move(error_handler); 43 error_handler_ = std::move(error_handler);
44 44
45 // Initialization should be completed before this type is enabled 45 // Initialization should be completed before this type is enabled
46 // and local device info must be available. 46 // and local device info must be available.
47 const DeviceInfo* local_device_info = 47 const DeviceInfo* local_device_info =
48 local_device_info_provider_->GetLocalDeviceInfo(); 48 local_device_info_provider_->GetLocalDeviceInfo();
49 DCHECK(local_device_info != NULL); 49 DCHECK(local_device_info != nullptr);
50 50
51 // Indicates whether a local device has been added or updated. 51 // Indicates whether a local device has been added or updated.
52 // |change_type| defaults to ADD and might be changed to 52 // |change_type| defaults to ADD and might be changed to
53 // UPDATE to INVALID down below if the initial data contains 53 // UPDATE to INVALID down below if the initial data contains
54 // data matching the local device ID. 54 // data matching the local device ID.
55 SyncChange::SyncChangeType change_type = SyncChange::ACTION_ADD; 55 SyncChange::SyncChangeType change_type = SyncChange::ACTION_ADD;
56 TimeDelta pulse_delay; 56 TimeDelta pulse_delay;
57 size_t num_items_new = 0; 57 size_t num_items_new = 0;
58 size_t num_items_updated = 0; 58 size_t num_items_updated = 0;
59 59
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 return SyncDataRemote(device_info).GetModifiedTime(); 315 return SyncDataRemote(device_info).GetModifiedTime();
316 } else { 316 } else {
317 // We shouldn't reach this point for remote data, so this means we're likely 317 // We shouldn't reach this point for remote data, so this means we're likely
318 // looking at the local device info. Using a long ago time is perfect, since 318 // looking at the local device info. Using a long ago time is perfect, since
319 // the desired behavior is to update/pulse our data as soon as possible. 319 // the desired behavior is to update/pulse our data as soon as possible.
320 return Time(); 320 return Time();
321 } 321 }
322 } 322 }
323 323
324 } // namespace syncer 324 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/device_info/device_info_data_type_controller_unittest.cc ('k') | components/sync/driver/about_sync_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698