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

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

Issue 7891021: Use stub impl when libcros fails to load (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix power manager stub impl Created 9 years, 3 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
Index: chrome/browser/chromeos/cros/libcros_service_library.cc
diff --git a/chrome/browser/chromeos/cros/libcros_service_library.cc b/chrome/browser/chromeos/cros/libcros_service_library.cc
index cd4d578d53bfae085d2927560ce06070de6f272c..4ea1856c586a73cff06e7be5a208b1795dc44fd5 100644
--- a/chrome/browser/chromeos/cros/libcros_service_library.cc
+++ b/chrome/browser/chromeos/cros/libcros_service_library.cc
@@ -108,9 +108,6 @@ class LibCrosServiceLibraryImpl : public LibCrosServiceLibrary {
LibCrosServiceLibraryImpl::LibCrosServiceLibraryImpl()
: service_connection_(NULL) {
- if (!CrosLibrary::Get()->EnsureLoaded()) {
- LOG(ERROR) << "Cros library has not been loaded.";
- }
}
LibCrosServiceLibraryImpl::~LibCrosServiceLibraryImpl() {
@@ -307,9 +304,12 @@ class LibCrosServiceLibraryStubImpl : public LibCrosServiceLibrary {
// Static.
LibCrosServiceLibrary* LibCrosServiceLibrary::GetImpl(bool stub) {
+ LibCrosServiceLibrary* impl;
if (stub)
- return new LibCrosServiceLibraryStubImpl();
- return new LibCrosServiceLibraryImpl();
+ impl = new LibCrosServiceLibraryStubImpl();
+ else
+ impl = new LibCrosServiceLibraryImpl();
+ return impl;
}
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698