| Index: chrome/browser/chromeos/policy/status_uploader.cc
|
| diff --git a/chrome/browser/chromeos/policy/status_uploader.cc b/chrome/browser/chromeos/policy/status_uploader.cc
|
| index 5bf420246ff77ca9ba5315671486de774cd82099..fd95fcab26f9197b41f33c0ab7461ed255193896 100644
|
| --- a/chrome/browser/chromeos/policy/status_uploader.cc
|
| +++ b/chrome/browser/chromeos/policy/status_uploader.cc
|
| @@ -10,11 +10,13 @@
|
| #include "base/bind_helpers.h"
|
| #include "base/location.h"
|
| #include "base/sequenced_task_runner.h"
|
| +#include "chrome/browser/chromeos/policy/device_local_account.h"
|
| #include "chrome/browser/chromeos/policy/device_status_collector.h"
|
| #include "chromeos/settings/cros_settings_names.h"
|
| #include "chromeos/settings/cros_settings_provider.h"
|
| #include "components/policy/core/common/cloud/cloud_policy_client.h"
|
| #include "components/policy/core/common/cloud/device_management_service.h"
|
| +#include "ui/base/user_activity/user_activity_detector.h"
|
|
|
| namespace {
|
| const int kMinUploadDelayMs = 60 * 1000; // 60 seconds
|
| @@ -103,6 +105,22 @@ void StatusUploader::RefreshUploadFrequency() {
|
| ScheduleNextStatusUpload();
|
| }
|
|
|
| +bool StatusUploader::IsSessionDataUploadAllowed() {
|
| + // Check if we're in an auto-launched kiosk session.
|
| + scoped_ptr<DeviceLocalAccount> account =
|
| + collector_->GetAutoLaunchedKioskSessionInfo();
|
| + if (!account)
|
| + return false;
|
| +
|
| + // Check if there has been any user input.
|
| + if (!ui::UserActivityDetector::Get()->last_activity_time().is_null())
|
| + return false;
|
| +
|
| + // TODO(atwilson): Check if we've captured any audio/video data
|
| + // (http://crbug.com/487261).
|
| + return true;
|
| +}
|
| +
|
| void StatusUploader::UploadStatus() {
|
| enterprise_management::DeviceStatusReportRequest device_status;
|
| bool have_device_status = collector_->GetDeviceStatus(&device_status);
|
|
|