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

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

Issue 2859043: Added system notification for update_engine. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: . Created 10 years, 5 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/cros_library.h ('k') | chrome/browser/chromeos/cros/mock_update_library.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/cros_library.cc
diff --git a/chrome/browser/chromeos/cros/cros_library.cc b/chrome/browser/chromeos/cros/cros_library.cc
index e9b834d323b1dc51683faf0329d34e8d010e3791..a9e469d31b7d5518c335ea155d527301ce437e83 100644
--- a/chrome/browser/chromeos/cros/cros_library.cc
+++ b/chrome/browser/chromeos/cros/cros_library.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/chromeos/cros/synaptics_library.h"
#include "chrome/browser/chromeos/cros/syslogs_library.h"
#include "chrome/browser/chromeos/cros/system_library.h"
+#include "chrome/browser/chromeos/cros/update_library.h"
namespace chromeos {
@@ -33,6 +34,7 @@ CrosLibrary::CrosLibrary() : library_loader_(NULL),
synaptics_lib_(NULL),
syslogs_lib_(NULL),
system_lib_(NULL),
+ update_lib_(NULL),
own_library_loader_(true),
own_cryptohome_lib_(true),
own_keyboard_lib_(true),
@@ -46,6 +48,7 @@ CrosLibrary::CrosLibrary() : library_loader_(NULL),
own_synaptics_lib_(true),
own_syslogs_lib_(true),
own_system_lib_(true),
+ own_update_lib_(true),
loaded_(false),
load_error_(false),
test_api_(NULL) {
@@ -79,6 +82,8 @@ CrosLibrary::~CrosLibrary() {
delete syslogs_lib_;
if (own_system_lib_)
delete system_lib_;
+ if (own_update_lib_)
+ delete update_lib_;
delete test_api_;
}
@@ -159,6 +164,12 @@ SystemLibrary* CrosLibrary::GetSystemLibrary() {
return system_lib_;
}
+UpdateLibrary* CrosLibrary::GetUpdateLibrary() {
+ if (!update_lib_)
+ update_lib_ = new UpdateLibraryImpl();
+ return update_lib_;
+}
+
bool CrosLibrary::EnsureLoaded() {
if (!loaded_ && !load_error_) {
if (!library_loader_)
@@ -281,4 +292,12 @@ void CrosLibrary::TestApi::SetSystemLibrary(SystemLibrary* library,
library_->system_lib_ = library;
}
+void CrosLibrary::TestApi::SetUpdateLibrary(UpdateLibrary* library,
+ bool own) {
+ if (library_->update_lib_)
+ delete library_->update_lib_;
+ library_->own_update_lib_ = own;
+ library_->update_lib_ = library;
+}
+
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/cros/cros_library.h ('k') | chrome/browser/chromeos/cros/mock_update_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698