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

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

Issue 7575001: cros: Remove unneeded includes from update_library.h plus some random cleanups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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/update_library.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/update_library.cc
diff --git a/chrome/browser/chromeos/cros/update_library.cc b/chrome/browser/chromeos/cros/update_library.cc
index c59bc49d871305124d5b9d704c2d17630eab52e3..f89763814033ae59f5a4914da3d2a72b0a44658f 100644
--- a/chrome/browser/chromeos/cros/update_library.cc
+++ b/chrome/browser/chromeos/cros/update_library.cc
@@ -4,8 +4,9 @@
#include "chrome/browser/chromeos/cros/update_library.h"
+#include "base/basictypes.h"
#include "base/message_loop.h"
-#include "base/string_util.h"
+#include "base/observer_list.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "content/browser/browser_thread.h"
@@ -13,16 +14,15 @@ namespace chromeos {
class UpdateLibraryImpl : public UpdateLibrary {
public:
- UpdateLibraryImpl()
- : status_connection_(NULL) {
- if (CrosLibrary::Get()->EnsureLoaded()) {
+ UpdateLibraryImpl() : status_connection_(NULL) {
+ if (CrosLibrary::Get()->EnsureLoaded())
Init();
stevenjb 2011/08/05 00:01:42 We should make Init() virtual for this class also
tfarina 2011/08/05 00:03:53 Sure, I'll do. It was in my TODO list. I was plann
- }
}
virtual ~UpdateLibraryImpl() {
if (status_connection_) {
- DisconnectUpdateProgress(status_connection_);
+ chromeos::DisconnectUpdateProgress(status_connection_);
+ status_connection_ = NULL;
}
}
@@ -66,14 +66,13 @@ class UpdateLibraryImpl : public UpdateLibrary {
}
private:
- static void ChangedHandler(void* object,
- const UpdateProgress& status) {
- UpdateLibraryImpl* updater = static_cast<UpdateLibraryImpl*>(object);
- updater->UpdateStatus(Status(status));
+ static void ChangedHandler(void* object, const UpdateProgress& status) {
+ UpdateLibraryImpl* impl = static_cast<UpdateLibraryImpl*>(object);
+ impl->UpdateStatus(Status(status));
}
void Init() {
- status_connection_ = MonitorUpdateStatus(&ChangedHandler, this);
+ status_connection_ = chromeos::MonitorUpdateStatus(&ChangedHandler, this);
// Asynchronously load the initial state.
RequestUpdateStatus(&ChangedHandler, this);
}
« no previous file with comments | « chrome/browser/chromeos/cros/update_library.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698