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

Unified Diff: chrome/browser/chromeos/cros/syslogs_library.cc

Issue 3076029: Allow chrome for cros to be started with a username / password (Closed)
Patch Set: Only declare StubLogin on cros builds Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/cros/syslogs_library.h ('k') | chrome/browser/chromeos/cros/system_library.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/syslogs_library.cc
diff --git a/chrome/browser/chromeos/cros/syslogs_library.cc b/chrome/browser/chromeos/cros/syslogs_library.cc
index 365e9fe8523a8b2ac4a74e1351773abeb42dad5c..7c5f4fa0173102375ec6aca86159eac5d5b10840 100644
--- a/chrome/browser/chromeos/cros/syslogs_library.cc
+++ b/chrome/browser/chromeos/cros/syslogs_library.cc
@@ -10,11 +10,38 @@
namespace chromeos {
-LogDictionaryType* SyslogsLibraryImpl::GetSyslogs(FilePath* tmpfilename) {
- if (CrosLibrary::Get()->EnsureLoaded()) {
- return chromeos::GetSystemLogs(tmpfilename);
+class SyslogsLibraryImpl : public SyslogsLibrary {
+ public:
+ SyslogsLibraryImpl() {}
+ virtual ~SyslogsLibraryImpl() {}
+
+ LogDictionaryType* GetSyslogs(FilePath* tmpfilename) {
+ if (CrosLibrary::Get()->EnsureLoaded()) {
+ return chromeos::GetSystemLogs(tmpfilename);
+ }
+ return NULL;
+ }
+};
+
+class SyslogsLibraryStubImpl : public SyslogsLibrary {
+ public:
+ SyslogsLibraryStubImpl() {}
+ virtual ~SyslogsLibraryStubImpl() {}
+
+ LogDictionaryType* GetSyslogs(FilePath* tmpfilename) {
+ return &log_dictionary_;
}
- return NULL;
+
+ private:
+ LogDictionaryType log_dictionary_;
+};
+
+// static
+SyslogsLibrary* SyslogsLibrary::GetImpl(bool stub) {
+ if (stub)
+ return new SyslogsLibraryStubImpl();
+ else
+ return new SyslogsLibraryImpl();
}
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/cros/syslogs_library.h ('k') | chrome/browser/chromeos/cros/system_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698