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

Issue 1997153002: libchrome: Several upstreamable fixes from libchrome

Created:
4 years, 7 months ago by Luis Héctor Chávez
Modified:
4 years, 6 months ago
CC:
asvitkine+watch_chromium.org, chirantan+watch_chromium.org, chromium-reviews, gavinp+memory_chromium.org, jshin+watch_chromium.org, sadrul, tracing+reviews_chromium.org, wfh+watch_chromium.org, Ken Rockot(use gerrit already)
Base URL:
https://chromium.googlesource.com/a/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

libchrome: Several upstreamable fixes from libchrome libchrome is a library in AOSP that contains parts of base/, components/, dbus/ and sandbox/ from Chrome. It uses stricter build warnings than Chrome (-Wunused-parameter, -Wsign-compare, -Wsign-promo), so uprevving is kind of painful. This change has all the cleanly upstreamable patches so that the next libchrome uprev is easier. BUG=None TEST=trybots, build in AOSP

Patch Set 1 #

Patch Set 2 : Fix Android build, add two more fixes #

Patch Set 3 : Being more careful with conditional compilation #

Patch Set 4 : Also fix unit tests #

Total comments: 39

Patch Set 5 : Addressed feedback #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -108 lines) Patch
M base/bind_unittest.cc View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M base/command_line.cc View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M base/debug/alias.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M base/debug/stack_trace_posix.cc View 1 2 3 4 3 chunks +6 lines, -4 lines 0 comments Download
M base/files/file_path.cc View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M base/files/file_util_linux.cc View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M base/files/file_util_posix.cc View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M base/lazy_instance.h View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M base/logging.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M base/memory/ref_counted.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M base/memory/shared_memory_android.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M base/memory/shared_memory_posix.cc View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M base/message_loop/incoming_task_queue.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M base/message_loop/message_pump_libevent.cc View 1 2 3 4 4 chunks +6 lines, -5 lines 0 comments Download
M base/metrics/histogram.cc View 1 2 3 4 7 chunks +7 lines, -3 lines 4 comments Download
M base/metrics/histogram_base.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M base/metrics/histogram_samples.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/metrics/persistent_histogram_allocator.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M base/metrics/sample_vector.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/metrics/sparse_histogram.cc View 1 2 3 4 2 chunks +7 lines, -7 lines 0 comments Download
M base/metrics/statistics_recorder.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/numerics/safe_conversions_impl.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/numerics/safe_math_impl.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/pickle.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M base/process/process_posix.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M base/strings/utf_string_conversion_utils.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/sync_socket_posix.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/task/cancelable_task_tracker.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/third_party/nspr/prtime.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/threading/platform_thread_linux.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/threading/thread_restrictions.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M base/threading/worker_pool_posix.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/trace_event/memory_dump_provider.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/trace_event/trace_event.h View 1 2 3 4 2 chunks +3 lines, -4 lines 0 comments Download
M base/trace_event/trace_log.cc View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M base/tracked_objects.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/values.cc View 1 2 3 4 1 chunk +11 lines, -11 lines 0 comments Download
M components/timers/alarm_timer_chromeos.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M dbus/bus.cc View 1 2 3 4 4 chunks +7 lines, -8 lines 0 comments Download
M dbus/exported_object.cc View 1 2 3 4 2 chunks +3 lines, -5 lines 0 comments Download
M dbus/object_manager.h View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M dbus/object_manager.cc View 1 2 3 4 3 chunks +7 lines, -6 lines 0 comments Download
M dbus/object_proxy.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M dbus/property.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 20 (8 generated)
Luis Héctor Chávez
PTAL danakj base/ derat components/timers/ satorux dbus/ rsleevi crypto/ All of these fixes are optional, ...
4 years, 7 months ago (2016-05-21 05:46:48 UTC) #2
Ryan Sleevi
Why is Android doing that? That's been something we've explicitly discouraged multiple times? It might ...
4 years, 7 months ago (2016-05-21 10:33:33 UTC) #3
danakj
https://codereview.chromium.org/1997153002/diff/60001/base/command_line.cc File base/command_line.cc (right): https://codereview.chromium.org/1997153002/diff/60001/base/command_line.cc#newcode152 base/command_line.cc:152: CommandLine::CommandLine(NoProgram /* no_program */) Just remove the name https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_Definitions ...
4 years, 7 months ago (2016-05-23 02:59:55 UTC) #4
satorux1
dbus/... LGTM. Maybe you can split changes in the directory into a separate patch? That ...
4 years, 7 months ago (2016-05-24 01:22:14 UTC) #5
Daniel Erat
lgtm for components/timers. (i hate -Wunused-parameter. can we just stop setting that on android?)
4 years, 7 months ago (2016-05-24 14:33:20 UTC) #6
Luis Héctor Chávez
Thanks for taking the time to review this! PTAAL. https://codereview.chromium.org/1997153002/diff/60001/base/command_line.cc File base/command_line.cc (right): https://codereview.chromium.org/1997153002/diff/60001/base/command_line.cc#newcode152 base/command_line.cc:152: ...
4 years, 7 months ago (2016-05-24 15:27:53 UTC) #8
Primiano Tucci (use gerrit)
//base/trace_event LGTM, but I agree with the comment above that this might have been split ...
4 years, 7 months ago (2016-05-24 16:43:52 UTC) #10
Alexei Svitkine (slow)
not lgtm for base/metrics https://codereview.chromium.org/1997153002/diff/80001/base/metrics/histogram.cc File base/metrics/histogram.cc (right): https://codereview.chromium.org/1997153002/diff/80001/base/metrics/histogram.cc#newcode1143 base/metrics/histogram.cc:1143: double CustomHistogram::GetBucketSize(Count /*current*/, uint32_t /*i*/) ...
4 years, 7 months ago (2016-05-24 17:39:12 UTC) #12
Luis Héctor Chávez
https://codereview.chromium.org/1997153002/diff/80001/base/metrics/histogram.cc File base/metrics/histogram.cc (right): https://codereview.chromium.org/1997153002/diff/80001/base/metrics/histogram.cc#newcode1143 base/metrics/histogram.cc:1143: double CustomHistogram::GetBucketSize(Count /*current*/, uint32_t /*i*/) const { On 2016/05/24 ...
4 years, 7 months ago (2016-05-24 17:45:07 UTC) #13
Alexei Svitkine (slow)
https://codereview.chromium.org/1997153002/diff/80001/base/metrics/histogram.cc File base/metrics/histogram.cc (right): https://codereview.chromium.org/1997153002/diff/80001/base/metrics/histogram.cc#newcode1143 base/metrics/histogram.cc:1143: double CustomHistogram::GetBucketSize(Count /*current*/, uint32_t /*i*/) const { On 2016/05/24 ...
4 years, 7 months ago (2016-05-24 17:48:54 UTC) #14
danakj
https://codereview.chromium.org/1997153002/diff/80001/base/metrics/histogram.cc File base/metrics/histogram.cc (right): https://codereview.chromium.org/1997153002/diff/80001/base/metrics/histogram.cc#newcode1143 base/metrics/histogram.cc:1143: double CustomHistogram::GetBucketSize(Count /*current*/, uint32_t /*i*/) const { On 2016/05/24 ...
4 years, 7 months ago (2016-05-24 18:39:52 UTC) #15
danakj
4 years, 7 months ago (2016-05-24 18:42:43 UTC) #16
https://codereview.chromium.org/1997153002/diff/60001/base/message_loop/messa...
File base/message_loop/message_pump_libevent.cc (right):

https://codereview.chromium.org/1997153002/diff/60001/base/message_loop/messa...
base/message_loop/message_pump_libevent.cc:200: static void timer_callback(int
/* fd */, short /* events */, void* context) {
On 2016/05/24 15:27:53, Luis Héctor Chávez wrote:
> On 2016/05/23 02:59:54, danakj wrote:
> > these need names to understand them though.. making them comments makes code
> > that doesn't follow the google style guide AFAICT. Can you contradict that?
> 
> The google style guide does allow parameter names as comments when they are
> unused and are not obvious:
>
https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_D...
> 
> It does not have whitespace around the name, though, so I'll change that.

Oh I see. It's not in the initial list of rules, but at the end of that section:
"Unused parameters that might not be obvious should comment out the variable
name in the function definition"

Okay.

Powered by Google App Engine
This is Rietveld 408576698