1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_DIAGNOSIS_RUNNER_H_
6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_DIAGNOSIS_RUNNER_H_
10 #include "base/basictypes.h"
11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/extensions/api/feedback_private/feedback_service.h"
13 #include "components/keyed_service/core/keyed_service.h"
19 // A class to run diagnose for kiosk app. Currently, it only schedules a
20 // feedback to collected.
21 class KioskDiagnosisRunner
: public KeyedService
{
23 // Run diagnostic jobs for |app_id|.
24 static void Run(Profile
* profile
, const std::string
& app_id
);
27 // A BrowserContextKeyedServiceFactory for this service.
30 explicit KioskDiagnosisRunner(Profile
* profile
);
31 ~KioskDiagnosisRunner() override
;
33 void Start(const std::string
& app_id
);
35 void StartSystemLogCollection();
36 void SendSysLogFeedback(const extensions::SystemInformationList
& sys_info
);
37 void OnFeedbackSent(bool sent
);
41 base::WeakPtrFactory
<KioskDiagnosisRunner
> weak_factory_
;
43 DISALLOW_COPY_AND_ASSIGN(KioskDiagnosisRunner
);
46 } // namespace chromeos
48 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_DIAGNOSIS_RUNNER_H_