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

Issue 447053002: Add Origin Power Map to Store Battery Auditing Data. (Closed)

Created:
6 years, 4 months ago by Daniel Nishi
Modified:
6 years, 4 months ago
CC:
chromium-reviews, scheib, Siva Chandra, Daniel Erat
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Initial commit for battery auditing by website origin by profile. This is part of Website Settings resource/permissions monitoring. Design Doc: https://docs.google.com/document/d/1oQwmj3AU4QYhTyGrYEGr6zaZhHUfx-wqUgEcQGbUU-U/edit?usp=sharing BUG=372607 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289689

Patch Set 1 #

Patch Set 2 : Remove a line from GYPI that shouldn't have been in this patch. #

Total comments: 18

Patch Set 3 : #

Patch Set 4 : Remove persistence. #

Total comments: 23

Patch Set 5 : Comments addressed. #

Total comments: 2

Patch Set 6 : #

Total comments: 2

Patch Set 7 : Add DCHECK_GE #

Patch Set 8 : Fix a bug with uninitialized POD. #

Patch Set 9 : Componentialize and remove dependency in //content. #

Total comments: 22

Patch Set 10 : Whoops, bad GN. #

Total comments: 2

Patch Set 11 : Address comments. #

Total comments: 6

Patch Set 12 : #

Total comments: 1

Patch Set 13 : Typo fix. #

Total comments: 2

Patch Set 14 : Add dependency. #

Patch Set 15 : Remove from Android GN due to content deps. #

Patch Set 16 : rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+267 lines, -8 lines) Patch
M components/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -0 lines 0 comments Download
M components/components.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -0 lines 0 comments Download
A + components/power.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -3 lines 0 comments Download
A + components/power/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -5 lines 0 comments Download
A + components/power/DEPS View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A components/power/OWNERS View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
A components/power/origin_power_map.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +51 lines, -0 lines 0 comments Download
A components/power/origin_power_map.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +52 lines, -0 lines 0 comments Download
A components/power/origin_power_map_factory.h View 1 2 3 4 5 6 7 8 1 chunk +35 lines, -0 lines 0 comments Download
A components/power/origin_power_map_factory.cc View 1 2 3 4 5 6 7 8 1 chunk +38 lines, -0 lines 0 comments Download
A components/power/origin_power_map_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +68 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (0 generated)
Daniel Nishi
sky@: PTAL when you get a moment.
6 years, 4 months ago (2014-08-06 21:39:53 UTC) #1
sky
Did this go through eng review? On Wed, Aug 6, 2014 at 2:39 PM, <dhnishi@chromium.org> ...
6 years, 4 months ago (2014-08-06 22:23:10 UTC) #2
sky
https://codereview.chromium.org/447053002/diff/20001/chrome/browser/power/origin_power_map.cc File chrome/browser/power/origin_power_map.cc (right): https://codereview.chromium.org/447053002/diff/20001/chrome/browser/power/origin_power_map.cc#newcode17 chrome/browser/power/origin_power_map.cc:17: DictionaryPrefUpdate update(prefs_, prefs::kBatteryOriginMap); Is kBatteryOriginMap effectively going to become ...
6 years, 4 months ago (2014-08-06 23:59:23 UTC) #3
Daniel Nishi
https://codereview.chromium.org/447053002/diff/20001/chrome/browser/power/origin_power_map.cc File chrome/browser/power/origin_power_map.cc (right): https://codereview.chromium.org/447053002/diff/20001/chrome/browser/power/origin_power_map.cc#newcode17 chrome/browser/power/origin_power_map.cc:17: DictionaryPrefUpdate update(prefs_, prefs::kBatteryOriginMap); On 2014/08/06 23:59:22, sky wrote: > ...
6 years, 4 months ago (2014-08-07 21:15:09 UTC) #4
sky
https://codereview.chromium.org/447053002/diff/20001/chrome/browser/power/origin_power_map.cc File chrome/browser/power/origin_power_map.cc (right): https://codereview.chromium.org/447053002/diff/20001/chrome/browser/power/origin_power_map.cc#newcode17 chrome/browser/power/origin_power_map.cc:17: DictionaryPrefUpdate update(prefs_, prefs::kBatteryOriginMap); On 2014/08/07 21:15:08, Daniel Nishi wrote: ...
6 years, 4 months ago (2014-08-07 21:47:07 UTC) #5
Daniel Nishi
https://codereview.chromium.org/447053002/diff/20001/chrome/browser/power/origin_power_map.cc File chrome/browser/power/origin_power_map.cc (right): https://codereview.chromium.org/447053002/diff/20001/chrome/browser/power/origin_power_map.cc#newcode17 chrome/browser/power/origin_power_map.cc:17: DictionaryPrefUpdate update(prefs_, prefs::kBatteryOriginMap); On 2014/08/07 21:47:07, sky wrote: > ...
6 years, 4 months ago (2014-08-07 22:43:12 UTC) #6
Daniel Nishi
sky: PTAL. Persistence have been removed for now.
6 years, 4 months ago (2014-08-08 17:01:40 UTC) #7
sky
Is there a reason this code needs to live in chrome? https://codereview.chromium.org/447053002/diff/100001/chrome/browser/power/origin_power_map.cc File chrome/browser/power/origin_power_map.cc (right): ...
6 years, 4 months ago (2014-08-08 19:12:25 UTC) #8
Daniel Nishi
https://codereview.chromium.org/447053002/diff/100001/chrome/browser/power/origin_power_map.cc File chrome/browser/power/origin_power_map.cc (right): https://codereview.chromium.org/447053002/diff/100001/chrome/browser/power/origin_power_map.cc#newcode20 chrome/browser/power/origin_power_map.cc:20: return -1; On 2014/08/08 19:12:25, sky wrote: > Why ...
6 years, 4 months ago (2014-08-08 19:41:06 UTC) #9
Daniel Nishi
Sorry, missed the top comment. I dropped it in Chrome since there is one map ...
6 years, 4 months ago (2014-08-08 19:54:29 UTC) #10
sky
https://codereview.chromium.org/447053002/diff/100001/chrome/browser/power/origin_power_map.cc File chrome/browser/power/origin_power_map.cc (right): https://codereview.chromium.org/447053002/diff/100001/chrome/browser/power/origin_power_map.cc#newcode40 chrome/browser/power/origin_power_map.cc:40: OriginPowerMap::PercentOriginMap* percent_map = On 2014/08/08 19:41:05, Daniel Nishi wrote: ...
6 years, 4 months ago (2014-08-08 23:15:29 UTC) #11
Daniel Nishi
https://codereview.chromium.org/447053002/diff/100001/chrome/browser/power/origin_power_map.cc File chrome/browser/power/origin_power_map.cc (right): https://codereview.chromium.org/447053002/diff/100001/chrome/browser/power/origin_power_map.cc#newcode40 chrome/browser/power/origin_power_map.cc:40: OriginPowerMap::PercentOriginMap* percent_map = On 2014/08/08 23:15:28, sky wrote: > ...
6 years, 4 months ago (2014-08-08 23:38:08 UTC) #12
sky
LGTM https://codereview.chromium.org/447053002/diff/140001/chrome/browser/power/origin_power_map.cc File chrome/browser/power/origin_power_map.cc (right): https://codereview.chromium.org/447053002/diff/140001/chrome/browser/power/origin_power_map.cc#newcode25 chrome/browser/power/origin_power_map.cc:25: GURL origin = url.GetOrigin(); DCHECK_GE(power, 0)
6 years, 4 months ago (2014-08-08 23:44:56 UTC) #13
Daniel Nishi
Darin sent an email saying this doesn't look like it needs an eng review, so ...
6 years, 4 months ago (2014-08-08 23:50:55 UTC) #14
Daniel Nishi
The CQ bit was checked by dhnishi@chromium.org
6 years, 4 months ago (2014-08-08 23:51:01 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dhnishi@chromium.org/447053002/160001
6 years, 4 months ago (2014-08-08 23:53:49 UTC) #16
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_rel_swarming on tryserver.chromium.mac ...
6 years, 4 months ago (2014-08-09 08:38:02 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-09 09:07:44 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/1486)
6 years, 4 months ago (2014-08-09 09:07:44 UTC) #19
sky
Actually, before you land I do have one more question. Why do you want to ...
6 years, 4 months ago (2014-08-09 14:22:08 UTC) #20
Daniel Nishi
On 2014/08/09 14:22:08, sky wrote: > Actually, before you land I do have one more ...
6 years, 4 months ago (2014-08-11 17:47:58 UTC) #21
sky
Is it Profile, or BrowserContext? On Mon, Aug 11, 2014 at 10:47 AM, <dhnishi@chromium.org> wrote: ...
6 years, 4 months ago (2014-08-11 19:19:19 UTC) #22
Daniel Nishi
On 2014/08/11 19:19:19, sky wrote: > Is it Profile, or BrowserContext? > > On Mon, ...
6 years, 4 months ago (2014-08-11 19:22:22 UTC) #23
sky
On Mon, Aug 11, 2014 at 12:22 PM, <dhnishi@chromium.org> wrote: > On 2014/08/11 19:19:19, sky ...
6 years, 4 months ago (2014-08-11 21:05:28 UTC) #24
Daniel Nishi
blundell: PTAL at the new component. +sivachandra@ +derat@ FYI and OWNERS
6 years, 4 months ago (2014-08-11 22:54:49 UTC) #25
blundell
https://codereview.chromium.org/447053002/diff/320001/components/power/origin_power_map_factory.h File components/power/origin_power_map_factory.h (right): https://codereview.chromium.org/447053002/diff/320001/components/power/origin_power_map_factory.h#newcode9 components/power/origin_power_map_factory.h:9: #include "components/keyed_service/content/browser_context_keyed_service_factory.h" Is this component intended to be used ...
6 years, 4 months ago (2014-08-12 12:49:00 UTC) #26
Daniel Erat
https://codereview.chromium.org/447053002/diff/280001/components/BUILD.gn File components/BUILD.gn (right): https://codereview.chromium.org/447053002/diff/280001/components/BUILD.gn#newcode59 components/BUILD.gn:59: "//components/power", fix sorting ("policy" < "power") https://codereview.chromium.org/447053002/diff/280001/components/power/origin_power_map.cc File components/power/origin_power_map.cc ...
6 years, 4 months ago (2014-08-12 15:58:53 UTC) #27
Daniel Nishi
https://codereview.chromium.org/447053002/diff/280001/components/BUILD.gn File components/BUILD.gn (right): https://codereview.chromium.org/447053002/diff/280001/components/BUILD.gn#newcode59 components/BUILD.gn:59: "//components/power", On 2014/08/12 15:58:51, Daniel Erat wrote: > fix ...
6 years, 4 months ago (2014-08-12 17:33:47 UTC) #28
Daniel Erat
https://codereview.chromium.org/447053002/diff/360001/components/power/DEPS File components/power/DEPS (right): https://codereview.chromium.org/447053002/diff/360001/components/power/DEPS#newcode2 components/power/DEPS:2: "+content/public/common", fix sorting here too https://codereview.chromium.org/447053002/diff/360001/components/power/origin_power_map.cc File components/power/origin_power_map.cc (right): ...
6 years, 4 months ago (2014-08-12 18:40:19 UTC) #29
Daniel Nishi
https://codereview.chromium.org/447053002/diff/360001/components/power/DEPS File components/power/DEPS (right): https://codereview.chromium.org/447053002/diff/360001/components/power/DEPS#newcode2 components/power/DEPS:2: "+content/public/common", On 2014/08/12 18:40:18, Daniel Erat wrote: > fix ...
6 years, 4 months ago (2014-08-12 19:57:35 UTC) #30
Daniel Erat
lgtm after fixing a typo https://codereview.chromium.org/447053002/diff/380001/components/power/origin_power_map.h File components/power/origin_power_map.h (right): https://codereview.chromium.org/447053002/diff/380001/components/power/origin_power_map.h#newcode37 components/power/origin_power_map.h:37: // OriginMap maps a ...
6 years, 4 months ago (2014-08-12 21:10:24 UTC) #31
sky
LGTM - thanks for moving!
6 years, 4 months ago (2014-08-12 22:55:48 UTC) #32
blundell
lgtm https://codereview.chromium.org/447053002/diff/400001/components/power/DEPS File components/power/DEPS (right): https://codereview.chromium.org/447053002/diff/400001/components/power/DEPS#newcode3 components/power/DEPS:3: "+content/public/common", This should be a dependency as well.
6 years, 4 months ago (2014-08-13 07:00:24 UTC) #33
Daniel Nishi
avi: PTAL as OWNER of content/public/common added to DEPS? https://codereview.chromium.org/447053002/diff/400001/components/power/DEPS File components/power/DEPS (right): https://codereview.chromium.org/447053002/diff/400001/components/power/DEPS#newcode3 components/power/DEPS:3: ...
6 years, 4 months ago (2014-08-13 17:03:35 UTC) #34
Avi (use Gerrit)
On 2014/08/13 17:03:35, Daniel Nishi wrote: > avi: PTAL as OWNER of content/public/common added to ...
6 years, 4 months ago (2014-08-13 17:38:21 UTC) #35
Daniel Nishi
On 2014/08/13 17:38:21, Avi wrote: > On 2014/08/13 17:03:35, Daniel Nishi wrote: > > avi: ...
6 years, 4 months ago (2014-08-13 17:40:56 UTC) #36
Avi (use Gerrit)
Well, LGTM then for now.
6 years, 4 months ago (2014-08-13 18:18:10 UTC) #37
Daniel Nishi
The CQ bit was checked by dhnishi@chromium.org
6 years, 4 months ago (2014-08-13 18:22:29 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dhnishi@chromium.org/447053002/420001
6 years, 4 months ago (2014-08-13 18:24:47 UTC) #39
Daniel Nishi
The CQ bit was checked by dhnishi@chromium.org
6 years, 4 months ago (2014-08-13 20:38:50 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dhnishi@chromium.org/447053002/460001
6 years, 4 months ago (2014-08-13 20:40:18 UTC) #41
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-14 02:42:40 UTC) #42
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-14 02:47:32 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/46783) mac_chromium_compile_dbg on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg/builds/5833) mac_chromium_rel_swarming ...
6 years, 4 months ago (2014-08-14 02:47:34 UTC) #44
Daniel Nishi
The CQ bit was checked by dhnishi@chromium.org
6 years, 4 months ago (2014-08-14 16:50:49 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dhnishi@chromium.org/447053002/480001
6 years, 4 months ago (2014-08-14 16:54:14 UTC) #46
commit-bot: I haz the power
6 years, 4 months ago (2014-08-14 20:25:38 UTC) #47
Message was sent while issue was closed.
Committed patchset #16 (480001) as 289689

Powered by Google App Engine
This is Rietveld 408576698