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

Issue 1193333017: Added system log uploader. (Closed)

Created:
5 years, 6 months ago by Polina Bondarenko
Modified:
5 years, 4 months ago
CC:
chromium-reviews, stevenjb+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added system log uploader. SystemLogUploader schedules log files uploads to server every 12 hours, in case of error makes single retry attempt after 120 sec. SystemLogDelegate creates UploadJob for every single log upload and loads log files from the disk. BUG=471888 Committed: https://crrev.com/9f172048dd6b0e816f13b1aa2abadc2edc6c38d2 Cr-Commit-Position: refs/heads/master@{#341533} Committed: https://crrev.com/48e1357232e5a5a52e90819f860ec30855ff7d8f Cr-Commit-Position: refs/heads/master@{#341718}

Patch Set 1 : #

Patch Set 2 : Moved SystemLogUploadJob creation to DeviceCloudPolicyManager. #

Total comments: 44

Patch Set 3 : Fixed comments. #

Total comments: 1

Patch Set 4 : Added FileReader - helper class that reads files thread safely. #

Total comments: 41

Patch Set 5 : Fixed comments, moved SystemLogDelegate to system_log_uploader.cc #

Total comments: 28

Patch Set 6 : Fixed comments. #

Total comments: 14

Patch Set 7 : Fixed comments, moved SystemLogDelegate back to system_log_uploader.cc #

Patch Set 8 : Small comment-fixes. #

Total comments: 6

Patch Set 9 : Fixed comments. #

Total comments: 8

Patch Set 10 : Fixed the last comments. #

Patch Set 11 : Fixed failed browser tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -1 line) Patch
M chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +4 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/policy/system_log_uploader.h View 1 2 3 4 5 6 7 8 9 1 chunk +109 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/policy/system_log_uploader.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +220 lines, -0 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (18 generated)
Polina Bondarenko
Hi Andrew, please take a look at chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc chrome/browser/chromeos/policy/system_log_delegate.h chrome/browser/chromeos/policy/system_log_delegate.cc chrome/browser/chromeos/policy/system_log_upload_job.h chrome/browser/chromeos/policy/system_log_upload_job.cc chrome/browser/chromeos/policy/system_log_uploader.h chrome/browser/chromeos/policy/system_log_uploader.cc
5 years, 6 months ago (2015-06-24 09:32:36 UTC) #4
Andrew T Wilson (Slow)
BTW, WeakPtrFactory is for when you are creating a Callback() and you want to embed ...
5 years, 5 months ago (2015-06-29 15:06:09 UTC) #5
Polina Bondarenko
Fixed comments, got rid of Unretained(), moved the file reading to FILE thread. https://codereview.chromium.org/1193333017/diff/60001/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc File ...
5 years, 5 months ago (2015-07-02 15:28:05 UTC) #7
Polina Bondarenko
https://codereview.chromium.org/1193333017/diff/120001/chrome/browser/chromeos/policy/system_log_delegate.cc File chrome/browser/chromeos/policy/system_log_delegate.cc (right): https://codereview.chromium.org/1193333017/diff/120001/chrome/browser/chromeos/policy/system_log_delegate.cc#newcode44 chrome/browser/chromeos/policy/system_log_delegate.cc:44: // and return to the current thread. The weak ...
5 years, 5 months ago (2015-07-03 13:34:19 UTC) #10
Andrew T Wilson (Slow)
https://codereview.chromium.org/1193333017/diff/180001/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc File chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc (right): https://codereview.chromium.org/1193333017/diff/180001/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc#newcode348 chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc:348: syslog_uploader_.reset(new SystemLogUploader(task_runner_)); This is OK to leave as-is, but ...
5 years, 5 months ago (2015-07-03 15:40:48 UTC) #12
Polina Bondarenko
Fixed comments. https://codereview.chromium.org/1193333017/diff/180001/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc File chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc (right): https://codereview.chromium.org/1193333017/diff/180001/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc#newcode348 chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc:348: syslog_uploader_.reset(new SystemLogUploader(task_runner_)); On 2015/07/03 15:40:47, Andrew T ...
5 years, 5 months ago (2015-07-08 10:07:24 UTC) #14
Andrew T Wilson (Slow)
So, consider whether you can get rid of SystemLogUploadJob::Delegate in favor of pre-loading that stuff ...
5 years, 5 months ago (2015-07-17 15:43:58 UTC) #16
Polina Bondarenko
Fixed comments. Rewrote structure: Cuurently we have SystemLogUploader that is UploadJob::Delegate and handles the server ...
5 years, 5 months ago (2015-07-23 14:27:31 UTC) #18
Andrew T Wilson (Slow)
Mostly looks good. I have to run to a meeting before finishing but I wanted ...
5 years, 4 months ago (2015-07-31 12:07:13 UTC) #19
Andrew T Wilson (Slow)
One more comment https://codereview.chromium.org/1193333017/diff/250001/chrome/browser/chromeos/policy/system_log_uploader.cc File chrome/browser/chromeos/policy/system_log_uploader.cc (right): https://codereview.chromium.org/1193333017/diff/250001/chrome/browser/chromeos/policy/system_log_uploader.cc#newcode79 chrome/browser/chromeos/policy/system_log_uploader.cc:79: // time from now. nit: This ...
5 years, 4 months ago (2015-07-31 13:05:06 UTC) #20
Polina Bondarenko
Fixed comments, SystemLogDelegate moved back to system_log_uploader.cc https://codereview.chromium.org/1193333017/diff/250001/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc File chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc (right): https://codereview.chromium.org/1193333017/diff/250001/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc#newcode137 chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc:137: class FileReader ...
5 years, 4 months ago (2015-07-31 13:52:04 UTC) #22
Andrew T Wilson (Slow)
LGTM with a couple of comments. https://codereview.chromium.org/1193333017/diff/310001/chrome/browser/chromeos/policy/system_log_uploader.cc File chrome/browser/chromeos/policy/system_log_uploader.cc (right): https://codereview.chromium.org/1193333017/diff/310001/chrome/browser/chromeos/policy/system_log_uploader.cc#newcode60 chrome/browser/chromeos/policy/system_log_uploader.cc:60: policy::SystemLogUploader::SystemLogs system_logs; This ...
5 years, 4 months ago (2015-08-03 09:55:51 UTC) #23
Polina Bondarenko
Hey Andrew, I fixed your comments, could you please take a last quick look at ...
5 years, 4 months ago (2015-08-03 11:53:13 UTC) #24
Andrew T Wilson (Slow)
https://codereview.chromium.org/1193333017/diff/330001/chrome/browser/chromeos/policy/system_log_uploader.cc File chrome/browser/chromeos/policy/system_log_uploader.cc (right): https://codereview.chromium.org/1193333017/diff/330001/chrome/browser/chromeos/policy/system_log_uploader.cc#newcode219 chrome/browser/chromeos/policy/system_log_uploader.cc:219: weak_ptr_factory_.reset(new base::WeakPtrFactory<SystemLogUploader>(this)); Let's just call InvalidateWeakPtrs() instead of reallocating ...
5 years, 4 months ago (2015-08-03 13:15:29 UTC) #25
Polina Bondarenko
Thanks for reviewing. https://codereview.chromium.org/1193333017/diff/330001/chrome/browser/chromeos/policy/system_log_uploader.cc File chrome/browser/chromeos/policy/system_log_uploader.cc (right): https://codereview.chromium.org/1193333017/diff/330001/chrome/browser/chromeos/policy/system_log_uploader.cc#newcode219 chrome/browser/chromeos/policy/system_log_uploader.cc:219: weak_ptr_factory_.reset(new base::WeakPtrFactory<SystemLogUploader>(this)); On 2015/08/03 13:15:29, Andrew ...
5 years, 4 months ago (2015-08-03 15:47:51 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1193333017/350001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1193333017/350001
5 years, 4 months ago (2015-08-03 15:48:19 UTC) #29
commit-bot: I haz the power
Committed patchset #10 (id:350001)
5 years, 4 months ago (2015-08-03 16:25:06 UTC) #30
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/9f172048dd6b0e816f13b1aa2abadc2edc6c38d2 Cr-Commit-Position: refs/heads/master@{#341533}
5 years, 4 months ago (2015-08-03 16:25:39 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1193333017/390001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1193333017/390001
5 years, 4 months ago (2015-08-04 11:41:44 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/85980)
5 years, 4 months ago (2015-08-04 13:09:54 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1193333017/390001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1193333017/390001
5 years, 4 months ago (2015-08-04 14:10:50 UTC) #39
commit-bot: I haz the power
Committed patchset #11 (id:390001)
5 years, 4 months ago (2015-08-04 14:16:43 UTC) #40
commit-bot: I haz the power
5 years, 4 months ago (2015-08-04 14:18:24 UTC) #41
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/48e1357232e5a5a52e90819f860ec30855ff7d8f
Cr-Commit-Position: refs/heads/master@{#341718}

Powered by Google App Engine
This is Rietveld 408576698