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

Unified Diff: chrome/browser/chromeos/policy/status_uploader.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/status_uploader.h
diff --git a/chrome/browser/chromeos/policy/status_uploader.h b/chrome/browser/chromeos/policy/status_uploader.h
index 2eead1847a73b43e4acc58e055eddf324f58c412..261a786cbb2613bf9a36e18b737913582c5573bc 100644
--- a/chrome/browser/chromeos/policy/status_uploader.h
+++ b/chrome/browser/chromeos/policy/status_uploader.h
@@ -38,12 +38,22 @@ class StatusUploader {
scoped_ptr<DeviceStatusCollector> collector,
const scoped_refptr<base::SequencedTaskRunner>& task_runner);
- ~StatusUploader();
+ virtual ~StatusUploader();
// Returns the time of the last successful upload, or Time(0) if no upload
// has ever happened.
base::Time last_upload() const { return last_upload_; }
+ // Returns true if session data upload (screenshots, logs, etc) is allowed.
+ // This checks to ensure that the current session is a kiosk session, and
+ // that no user input (keyboard, mouse, touch, audio/video) has been received.
+ // Virtual to allow mocking in tests.
+ virtual bool IsSessionDataUploadAllowed();
+
+ protected:
+ // Empty constructor to be used when generating mocks.
+ StatusUploader();
cschuet (SLOW) 2015/05/13 15:56:09 I see the necessity to introduce this empty constr
Andrew T Wilson (Slow) 2015/05/15 09:43:51 Removed. Thanks for the feedback - much cleaner no
+
private:
// Callback invoked periodically to upload the device status from the
// DeviceStatusCollector.

Powered by Google App Engine
This is Rietveld 408576698