Commit 96e73542 authored by Luis Hector Chavez's avatar Luis Hector Chavez Committed by Commit Bot

arc: Remove the base::MakeUnique presubmit

Now that base::MakeUnique is no more, we don't need this anymore.

Bug: 755727
Test: git cl upload
Change-Id: Ia90edbd28bbaca79afa5aa554677855e3b98cdfd
Reviewed-on: https://chromium-review.googlesource.com/944511Reviewed-by: default avatarYusuke Sato <yusukes@chromium.org>
Commit-Queue: Luis Hector Chavez <lhchavez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540312}
parent 93a9cea6
......@@ -2,27 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
_CPP_WHITE_LIST = (r'.+\.cc$', r'.+\.h$')
def CheckMakeUnique(input_api, output_api):
"""Encourage to use std::make_unique, instead of base::MakeUnique."""
errors = []
def SourceFilter(affected_file):
return input_api.FilterSourceFile(affected_file, _CPP_WHITE_LIST,
input_api.DEFAULT_BLACK_LIST)
for f in input_api.AffectedSourceFiles(SourceFilter):
for line_number, line in f.ChangedContents():
if input_api.re.search(r'\bbase::MakeUnique<', line):
errors.append(output_api.PresubmitError(
'%s:%d uses base::MakeUnique. Use std::make_unique instead.' %
(f.LocalPath(), line_number)))
return errors
def CheckChangeOnUpload(input_api, output_api):
results = []
results += input_api.canned_checks.CheckChangeLintsClean(
input_api, output_api)
results += CheckMakeUnique(input_api, output_api)
return results
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