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

Issue 5321001: cashew: don't propagate inactive plans to clients (Closed)

Created:
10 years, 1 month ago by Vince Laviano
Modified:
9 years ago
Reviewers:
rtc
CC:
chromium-os-reviews_chromium.org, Vince Laviano, Jason Glasgow
Visibility:
Public.

Description

cashew: don't propagate inactive plans to clients Filter inactive (future, expired, consumed) plans when responding to client D-Bus requests or emitting D-Bus signals. BUG=chromium-os:9397 TEST=unit tests, manual testing on device Change-Id: Ie221823627b3864802100aa619aa04b8cb949ac7 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=4c69558

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address rtc code review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -8 lines) Patch
M src/data_plan.h View 1 3 chunks +10 lines, -0 lines 0 comments Download
M src/data_plan.cc View 1 4 chunks +14 lines, -4 lines 0 comments Download
M src/data_plan_unittest.cc View 3 chunks +194 lines, -1 line 0 comments Download
M src/service.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M src/service.cc View 2 chunks +10 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Vince Laviano
The carrier usage API sometimes includes expired or fully consumed plans in the plans list ...
10 years, 1 month ago (2010-11-23 04:03:40 UTC) #1
rtc
http://codereview.chromium.org/5321001/diff/1/src/data_plan.cc File src/data_plan.cc (right): http://codereview.chromium.org/5321001/diff/1/src/data_plan.cc#newcode54 src/data_plan.cc:54: CHECK_GE(data_bytes_used_, 0); I'm wondering if it would be better ...
10 years, 1 month ago (2010-11-23 04:38:58 UTC) #2
rtc
LGTM, based on comments from IM. -Ryan On Mon, Nov 22, 2010 at 8:38 PM, ...
10 years, 1 month ago (2010-11-23 05:03:10 UTC) #3
Vince Laviano
10 years, 1 month ago (2010-11-23 05:11:04 UTC) #4
http://codereview.chromium.org/5321001/diff/1/src/data_plan.cc
File src/data_plan.cc (right):

http://codereview.chromium.org/5321001/diff/1/src/data_plan.cc#newcode54
src/data_plan.cc:54: CHECK_GE(data_bytes_used_, 0);
On 2010/11/23 04:38:58, rtc wrote:
> I'm wondering if it would be better to have unit test cases to replace these
> asserts

Removed asserts that test values hardcoded in member initialization list
(local_bytes_used) or that are defined in the member initialization list as
equivalent to other values that are already checked (total_bytes_used). 

The constraint that these values be >= 0 is checked by our unit tests.

http://codereview.chromium.org/5321001/diff/1/src/data_plan.h
File src/data_plan.h (right):

http://codereview.chromium.org/5321001/diff/1/src/data_plan.h#newcode82
src/data_plan.h:82: virtual Bytes GetTotalBytesUsed() const;
On 2010/11/23 04:38:58, rtc wrote:
> Google style says that accessors should not include "Get", just
> total_bytes_used() instead of GetTotalBytesUsed()

Added TODO.

http://codereview.chromium.org/5321001/diff/1/src/service.h
File src/service.h (left):

http://codereview.chromium.org/5321001/diff/1/src/service.h#oldcode81
src/service.h:81: virtual DBusDataPlanList GetDBusDataPlans() const;
On 2010/11/23 04:38:58, rtc wrote:
> Same comment about the accessor style. I'm happy with TODOs in the headers for
> now. 

Done. Added TODO.

Powered by Google App Engine
This is Rietveld 408576698