Bug 130573 - [WK2] Refine WebKit2 BatteryStatus code
Summary: [WK2] Refine WebKit2 BatteryStatus code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jinwoo Song
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-21 02:16 PDT by Jinwoo Song
Modified: 2014-03-23 21:38 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.65 KB, patch)
2014-03-21 02:44 PDT, Jinwoo Song
no flags Details | Formatted Diff | Diff
Patch (5.52 KB, patch)
2014-03-23 21:00 PDT, Jinwoo Song
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jinwoo Song 2014-03-21 02:16:01 PDT
Refinements
 - Return PassRef instead of PassRefPtr in create methods
 - Use auto instead of iterator
Comment 1 Jinwoo Song 2014-03-21 02:44:51 PDT
Created attachment 227405 [details]
Patch
Comment 2 Anders Carlsson 2014-03-23 08:18:36 PDT
Comment on attachment 227405 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=227405&action=review

> Source/WebKit2/WebProcess/Battery/WebBatteryManager.cpp:80
> +    for (auto it = m_pageSet.begin(), end = m_pageSet.end(); it != end; ++it) {

This can just use the range for syntax, 

for (auto* page : m_pageSet)

> Source/WebKit2/WebProcess/Battery/WebBatteryManager.cpp:91
> +    for (auto it = m_pageSet.begin(), end = m_pageSet.end(); it != end; ++it) {

Ditto.
Comment 3 Jinwoo Song 2014-03-23 21:00:35 PDT
Created attachment 227621 [details]
Patch

Applied Andersca's comments.
Comment 4 WebKit Commit Bot 2014-03-23 21:38:22 PDT
Comment on attachment 227621 [details]
Patch

Clearing flags on attachment: 227621

Committed r166148: <http://trac.webkit.org/changeset/166148>
Comment 5 WebKit Commit Bot 2014-03-23 21:38:26 PDT
All reviewed patches have been landed.  Closing bug.