Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / chromeos / app_mode / kiosk_diagnosis_runner.h
blob21b0902b76394642f9b8dadd0c623a2c7293e468
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_
8 #include <string>
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"
15 class Profile;
17 namespace chromeos {
19 // A class to run diagnose for kiosk app. Currently, it only schedules a
20 // feedback to collected.
21 class KioskDiagnosisRunner : public KeyedService {
22 public:
23 // Run diagnostic jobs for |app_id|.
24 static void Run(Profile* profile, const std::string& app_id);
26 private:
27 // A BrowserContextKeyedServiceFactory for this service.
28 class Factory;
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);
39 Profile* profile_;
40 std::string app_id_;
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_