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

Issue 2763613004: Use std::unique_ptr for access to BackgroundFetchJobInfo (Closed)

Created:
3 years, 9 months ago by harkness
Modified:
3 years, 9 months ago
Reviewers:
Peter Beverloo
CC:
chromium-reviews, Peter Beverloo, darin-cc_chromium.org, jam, harkness+watch_chromium.org, awdf+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use std::unique_ptr for access to BackgroundFetchJobInfo As a temporary implementation, the code was storing maps of BackgroundFetchJobInfo and BackgroundFetchRequestInfo. The RequestInfo can't be converted to unique_ptr because we need access to it from two places until the storage solution is available, but the RequestInfo is only accessed from the DataManager, so that can be switched to unique_ptr. This also allows the JobInfo itself to hold a unique_ptr. BUG=699957 Review-Url: https://codereview.chromium.org/2763613004 Cr-Commit-Position: refs/heads/master@{#458371} Committed: https://chromium.googlesource.com/chromium/src/+/3a3ff3e332e4667ca5424370e3d7823aebbd82db

Patch Set 1 #

Total comments: 9

Patch Set 2 : Fixed std::move issue #

Total comments: 2

Patch Set 3 : Missed one #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -37 lines) Patch
M content/browser/background_fetch/background_fetch_context.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/background_fetch/background_fetch_context.cc View 1 1 chunk +7 lines, -6 lines 0 comments Download
M content/browser/background_fetch/background_fetch_data_manager.h View 1 3 chunks +5 lines, -3 lines 0 comments Download
M content/browser/background_fetch/background_fetch_data_manager.cc View 1 2 1 chunk +12 lines, -10 lines 0 comments Download
M content/browser/background_fetch/background_fetch_data_manager_unittest.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_info.h View 1 3 chunks +3 lines, -4 lines 0 comments Download
M content/browser/background_fetch/background_fetch_job_info.cc View 1 1 chunk +0 lines, -10 lines 0 comments Download

Messages

Total messages: 12 (5 generated)
harkness
3 years, 9 months ago (2017-03-20 17:45:23 UTC) #2
Peter Beverloo
https://codereview.chromium.org/2763613004/diff/1/content/browser/background_fetch/background_fetch_data_manager.cc File content/browser/background_fetch/background_fetch_data_manager.cc (right): https://codereview.chromium.org/2763613004/diff/1/content/browser/background_fetch/background_fetch_data_manager.cc#newcode40 content/browser/background_fetch/background_fetch_data_manager.cc:40: WriteJobToStorage(std::move(job_info), std::move(request_infos)); One of the contracts of std::move() is ...
3 years, 9 months ago (2017-03-20 18:14:05 UTC) #3
harkness
https://codereview.chromium.org/2763613004/diff/1/content/browser/background_fetch/background_fetch_data_manager.cc File content/browser/background_fetch/background_fetch_data_manager.cc (right): https://codereview.chromium.org/2763613004/diff/1/content/browser/background_fetch/background_fetch_data_manager.cc#newcode40 content/browser/background_fetch/background_fetch_data_manager.cc:40: WriteJobToStorage(std::move(job_info), std::move(request_infos)); On 2017/03/20 18:14:05, Peter Beverloo wrote: > ...
3 years, 9 months ago (2017-03-20 18:40:27 UTC) #4
Peter Beverloo
lgtm % comment https://codereview.chromium.org/2763613004/diff/1/content/browser/background_fetch/background_fetch_data_manager.h File content/browser/background_fetch/background_fetch_data_manager.h (right): https://codereview.chromium.org/2763613004/diff/1/content/browser/background_fetch/background_fetch_data_manager.h#newcode39 content/browser/background_fetch/background_fetch_data_manager.h:39: void WriteJobToStorage(std::unique_ptr<BackgroundFetchJobInfo> job_info, On 2017/03/20 18:40:26, ...
3 years, 9 months ago (2017-03-20 18:42:41 UTC) #5
harkness
https://codereview.chromium.org/2763613004/diff/20001/content/browser/background_fetch/background_fetch_data_manager.cc File content/browser/background_fetch/background_fetch_data_manager.cc (right): https://codereview.chromium.org/2763613004/diff/20001/content/browser/background_fetch/background_fetch_data_manager.cc#newcode38 content/browser/background_fetch/background_fetch_data_manager.cc:38: const std::string& job_guid = job_info->guid(); On 2017/03/20 18:42:41, Peter ...
3 years, 9 months ago (2017-03-21 10:14:07 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2763613004/40001
3 years, 9 months ago (2017-03-21 10:14:38 UTC) #9
commit-bot: I haz the power
3 years, 9 months ago (2017-03-21 11:07:37 UTC) #12
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/3a3ff3e332e4667ca5424370e3d7...

Powered by Google App Engine
This is Rietveld 408576698