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

Unified Diff: chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h

Issue 1135413002: Disable screenshot uploading if there has been user input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed leak in test. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h
diff --git a/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h b/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h
index 819ca33c472958c9b9e2e518cdcb786cace2fb01..18e473411361ea59cf7d118c4077de7bd7e4f840 100644
--- a/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h
+++ b/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h
@@ -25,6 +25,8 @@
namespace policy {
+class StatusUploader;
+
// This class implementens a RemoteCommandJob that captures a screenshot from
// each attached screen and uploads the collected PNG data using UploadJob to
// the url specified in the "fileUploadUrl" field of the CommandPayload. Only
@@ -76,7 +78,8 @@ class DeviceCommandScreenshotJob : public RemoteCommandJob,
UploadJob::Delegate*) = 0;
};
- explicit DeviceCommandScreenshotJob(scoped_ptr<Delegate> screenshot_delegate);
+ DeviceCommandScreenshotJob(scoped_ptr<Delegate> screenshot_delegate,
+ StatusUploader* uploader);
cschuet (SLOW) 2015/05/13 15:56:09 This is quite a heavy dependency just to call a bo
Andrew T Wilson (Slow) 2015/05/15 09:43:51 Moved logic into ScreenshotDelegate - good call.
~DeviceCommandScreenshotJob() override;
// RemoteCommandJob:
@@ -123,6 +126,10 @@ class DeviceCommandScreenshotJob : public RemoteCommandJob,
// The upload job instance that will upload the screenshots.
scoped_ptr<UploadJob> upload_job_;
+ // StatusUploader used to check whether screenshot uploads are allowed in
+ // this session.
+ StatusUploader* status_uploader_;
+
base::WeakPtrFactory<DeviceCommandScreenshotJob> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(DeviceCommandScreenshotJob);

Powered by Google App Engine
This is Rietveld 408576698