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

Issue 2832008: add C wrapper for libmetrics (Closed)

Created:
10 years, 6 months ago by Sam Leffler
Modified:
9 years, 7 months ago
Reviewers:
petkov
CC:
chromium-os-reviews_chromium.org
Base URL:
ssh://git@chromiumos-git//metrics.git
Visibility:
Public.

Description

add C wrapper for libmetrics TEST=unit tests + build&test crosmetrics plugin for flimflam

Patch Set 1 #

Total comments: 28

Patch Set 2 : review comments #

Patch Set 3 : add guards so c_metrics_library.h can be included from C #

Patch Set 4 : rename per style & guard null ptr derefs #

Total comments: 6

Patch Set 5 : fix cast #

Total comments: 12

Patch Set 6 : combine C wrapper tests w/ existing C++ tests #

Total comments: 8

Patch Set 7 : yet more style changes #

Total comments: 12

Patch Set 8 : more style #

Patch Set 9 : remove include #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -2 lines) Patch
M Makefile View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A c_metrics_library.h View 1 2 3 4 5 6 7 1 chunk +33 lines, -0 lines 1 comment Download
A c_metrics_library.cc View 1 2 3 4 5 6 7 8 1 chunk +44 lines, -0 lines 0 comments Download
M metrics_library.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M metrics_library_test.cc View 6 7 2 chunks +45 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Sam Leffler
Most of this is total guesswork so be gentle :-) TEST=FEATURES=test emerge-x86-generic metrics
10 years, 6 months ago (2010-06-16 22:58:24 UTC) #1
petkov
Thank you very much for working on this. Mostly style comments. Generally, I think we ...
10 years, 6 months ago (2010-06-16 23:51:56 UTC) #2
petkov
http://codereview.chromium.org/2832008/diff/1/3 File c_metrics_library.cc (right): http://codereview.chromium.org/2832008/diff/1/3#newcode16 c_metrics_library.cc:16: return (struct metrics_library *)handle; static_cast http://codereview.chromium.org/2832008/diff/1/3#newcode20 c_metrics_library.cc:20: MetricsLibrary *handle ...
10 years, 6 months ago (2010-06-16 23:55:31 UTC) #3
Sam Leffler
Thanks for the help w/ syntax/style. PTAL http://codereview.chromium.org/2832008/diff/1/3 File c_metrics_library.cc (right): http://codereview.chromium.org/2832008/diff/1/3#newcode9 c_metrics_library.cc:9: #include "metrics_library.h" ...
10 years, 6 months ago (2010-06-17 14:57:44 UTC) #4
petkov
It seems that you haven't addressed the naming convention comments (and most of the other ...
10 years, 6 months ago (2010-06-17 16:21:08 UTC) #5
Sam Leffler
one more time please; think I've followed style for naming etc.
10 years, 6 months ago (2010-06-17 18:03:18 UTC) #6
petkov
Much better :-) A few more style nits. You need to move the * and ...
10 years, 6 months ago (2010-06-17 18:25:48 UTC) #7
Sam Leffler
Think I got 'em all. http://codereview.chromium.org/2832008/diff/13001/14003 File c_metrics_library.h (right): http://codereview.chromium.org/2832008/diff/13001/14003#newcode13 c_metrics_library.h:13: CMetricsLibrary CMetricsLibraryNew(void); On 2010/06/17 ...
10 years, 6 months ago (2010-06-17 18:55:20 UTC) #8
petkov
Almost there... http://codereview.chromium.org/2832008/diff/26001/27002 File c_metrics_library.cc (right): http://codereview.chromium.org/2832008/diff/26001/27002#newcode9 c_metrics_library.cc:9: #include <cstring> You don't need this include, ...
10 years, 6 months ago (2010-06-17 19:29:19 UTC) #9
Sam Leffler
Do I get a prize for most reviews / lines of code? http://codereview.chromium.org/2832008/diff/26001/27002 File c_metrics_library.cc ...
10 years, 6 months ago (2010-06-17 20:44:58 UTC) #10
petkov
10 years, 6 months ago (2010-06-17 21:00:32 UTC) #11
Nope but you may get a prize for writing the most beautiful code ever :-)

LGTM

Thanks again for looking into this.

http://codereview.chromium.org/2832008/diff/31001/32003
File c_metrics_library.h (right):

http://codereview.chromium.org/2832008/diff/31001/32003#newcode14
c_metrics_library.h:14: CMetricsLibrary CMetricsLibraryNew(void);
Do you need the "void" here?

Powered by Google App Engine
This is Rietveld 408576698