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

Side by Side 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: Self-review 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_STATUS_UPLOADER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_STATUS_UPLOADER_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_STATUS_UPLOADER_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_STATUS_UPLOADER_H_
7 7
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 26 matching lines...) Expand all
37 CloudPolicyClient* client, 37 CloudPolicyClient* client,
38 scoped_ptr<DeviceStatusCollector> collector, 38 scoped_ptr<DeviceStatusCollector> collector,
39 const scoped_refptr<base::SequencedTaskRunner>& task_runner); 39 const scoped_refptr<base::SequencedTaskRunner>& task_runner);
40 40
41 ~StatusUploader(); 41 ~StatusUploader();
42 42
43 // Returns the time of the last successful upload, or Time(0) if no upload 43 // Returns the time of the last successful upload, or Time(0) if no upload
44 // has ever happened. 44 // has ever happened.
45 base::Time last_upload() const { return last_upload_; } 45 base::Time last_upload() const { return last_upload_; }
46 46
47 // Returns true if session data upload (screenshots, logs, etc) is allowed.
48 // This checks to ensure that the current session is a kiosk session, and
49 // that no user input (keyboard, mouse, touch, audio/video) has been received.
50 bool IsSessionDataUploadAllowed();
51
47 private: 52 private:
48 // Callback invoked periodically to upload the device status from the 53 // Callback invoked periodically to upload the device status from the
49 // DeviceStatusCollector. 54 // DeviceStatusCollector.
50 void UploadStatus(); 55 void UploadStatus();
51 56
52 // Invoked once a status upload has completed. 57 // Invoked once a status upload has completed.
53 void OnUploadCompleted(bool success); 58 void OnUploadCompleted(bool success);
54 59
55 // Helper method that figures out when the next status upload should 60 // Helper method that figures out when the next status upload should
56 // be scheduled. 61 // be scheduled.
(...skipping 28 matching lines...) Expand all
85 // Note: This should remain the last member so it'll be destroyed and 90 // Note: This should remain the last member so it'll be destroyed and
86 // invalidate the weak pointers before any other members are destroyed. 91 // invalidate the weak pointers before any other members are destroyed.
87 base::WeakPtrFactory<StatusUploader> weak_factory_; 92 base::WeakPtrFactory<StatusUploader> weak_factory_;
88 93
89 DISALLOW_COPY_AND_ASSIGN(StatusUploader); 94 DISALLOW_COPY_AND_ASSIGN(StatusUploader);
90 }; 95 };
91 96
92 } // namespace policy 97 } // namespace policy
93 98
94 #endif // CHROME_BROWSER_CHROMEOS_POLICY_STATUS_UPLOADER_H_ 99 #endif // CHROME_BROWSER_CHROMEOS_POLICY_STATUS_UPLOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698