| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CROS_SYSLOGS_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_SYSLOGS_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_SYSLOGS_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_SYSLOGS_LIBRARY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/singleton.h" | 9 #include "base/singleton.h" |
| 10 #include "cros/chromeos_syslogs.h" | 10 #include "cros/chromeos_syslogs.h" |
| 11 | 11 |
| 12 namespace chromeos { | 12 namespace chromeos { |
| 13 | 13 |
| 14 // This interface defines interaction with the ChromeOS syslogs APIs. | 14 // This interface defines interaction with the ChromeOS syslogs APIs. |
| 15 class SyslogsLibrary { | 15 class SyslogsLibrary { |
| 16 public: | 16 public: |
| 17 SyslogsLibrary() {} | 17 SyslogsLibrary() {} |
| 18 virtual ~SyslogsLibrary() {} | 18 virtual ~SyslogsLibrary() {} |
| 19 | 19 |
| 20 // System logs gathered for userfeedback | 20 // System logs gathered for userfeedback |
| 21 virtual LogDictionaryType* GetSyslogs(FilePath* tmpfilename) = 0; | 21 virtual LogDictionaryType* GetSyslogs(FilePath* tmpfilename) = 0; |
| 22 }; | |
| 23 | 22 |
| 24 | 23 // Get library implementation. |
| 25 // This class handles the interaction with the ChromeOS syslogs APIs. | 24 static SyslogsLibrary* GetImpl(bool stub); |
| 26 class SyslogsLibraryImpl : public SyslogsLibrary { | |
| 27 public: | |
| 28 SyslogsLibraryImpl() {} | |
| 29 virtual ~SyslogsLibraryImpl() {} | |
| 30 | |
| 31 virtual LogDictionaryType* GetSyslogs(FilePath* tmpfilename); | |
| 32 | |
| 33 private: | |
| 34 DISALLOW_COPY_AND_ASSIGN(SyslogsLibraryImpl); | |
| 35 }; | 25 }; |
| 36 | 26 |
| 37 } // namespace chromeos | 27 } // namespace chromeos |
| 38 | 28 |
| 39 #endif // CHROME_BROWSER_CHROMEOS_CROS_SYSLOGS_LIBRARY_H_ | 29 #endif // CHROME_BROWSER_CHROMEOS_CROS_SYSLOGS_LIBRARY_H_ |
| OLD | NEW |