Commit 7753ec02 authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

UMA: prefer nullptr to NULL

No change to logic. This updates C++ code in the metrics component to
use nullptr instead of NULL. This is to align with the chromium C++
styleguide.

Bug: 1010369
Test: git cl presubmit --upload
Change-Id: Ib4133584972ae6069e469c58798cd1a323b4eeec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1835091Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702718}
parent 38b311f5
......@@ -33,13 +33,13 @@ class MetricsLogManager {
MetricsLog* current_log() { return current_log_.get(); }
// Closes |current_log_|, compresses it, and stores it in the |log_store| for
// later, leaving |current_log_| NULL.
// later, leaving |current_log_| nullptr.
void FinishCurrentLog(MetricsLogStore* log_store);
// Closes and discards |current_log|.
void DiscardCurrentLog();
// Sets current_log to NULL, but saves the current log for future use with
// Sets current_log to nullptr, but saves the current log for future use with
// ResumePausedLog(). Only one log may be paused at a time.
// TODO(stuartmorgan): Pause/resume support is really a workaround for a
// design issue in initial log writing; that should be fixed, and pause/resume
......
......@@ -91,9 +91,9 @@ class MetricsStateManager final {
CreateLowEntropyProvider();
// Creates the MetricsStateManager, enforcing that only a single instance
// of the class exists at a time. Returns NULL if an instance exists already.
// On Windows, |backup_registry_key| is used to store a backup of the clean
// exit beacon. It is ignored on other platforms.
// of the class exists at a time. Returns nullptr if an instance exists
// already. On Windows, |backup_registry_key| is used to store a backup of the
// clean exit beacon. It is ignored on other platforms.
static std::unique_ptr<MetricsStateManager> Create(
PrefService* local_state,
EnabledStateProvider* enabled_state_provider,
......
......@@ -101,7 +101,7 @@ void WifiAccessPointInfoProviderChromeos::ParseInfo(
properties.GetStringWithoutPathExpansion(
shill::kWifiBSsid, &wifi_access_point_info_.bssid);
const base::DictionaryValue* vendor_dict = NULL;
const base::DictionaryValue* vendor_dict = nullptr;
if (!properties.GetDictionaryWithoutPathExpansion(
shill::kWifiVendorInformationProperty,
&vendor_dict))
......
......@@ -19,7 +19,7 @@ namespace SerializationUtils {
// Deserializes a sample passed as a string and return a sample.
// The return value will either be a scoped_ptr to a Metric sample (if the
// deserialization was successful) or a NULL scoped_ptr.
// deserialization was successful) or a nullptr scoped_ptr.
std::unique_ptr<MetricSample> ParseSample(const std::string& sample);
// Reads all samples from a file and truncate the file when done.
......
......@@ -134,7 +134,7 @@ bool SystemSessionAnalyzer::FetchEvents(size_t requested_events,
// Retrieve events: 2 events per session, plus the current session's start.
DWORD desired_event_cnt = requested_events;
std::vector<EVT_HANDLE> events_raw(desired_event_cnt, NULL);
std::vector<EVT_HANDLE> events_raw(desired_event_cnt, nullptr);
DWORD event_cnt = 0U;
BOOL success = ::EvtNext(query_handle_.get(), desired_event_cnt,
events_raw.data(), kTimeoutMs, 0, &event_cnt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment