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

Unified Diff: chromeos/memory/low_memory_listener.cc

Issue 15774005: chromeos: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | « chromeos/login/login_state_unittest.cc ('k') | chromeos/network/cert_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/memory/low_memory_listener.cc
diff --git a/chromeos/memory/low_memory_listener.cc b/chromeos/memory/low_memory_listener.cc
index a53e7b7bae8c8469a0e735568536c789e3415454..23d1daec08ea1a60bc6ba35683fbcf78c89c55ed 100644
--- a/chromeos/memory/low_memory_listener.cc
+++ b/chromeos/memory/low_memory_listener.cc
@@ -72,7 +72,7 @@ class LowMemoryListenerImpl
void StartWatchingDescriptor();
// Delegate to receive events from WatchFileDescriptor.
- class FileWatcherDelegate : public MessageLoopForIO::Watcher {
+ class FileWatcherDelegate : public base::MessageLoopForIO::Watcher {
public:
explicit FileWatcherDelegate(LowMemoryListenerImpl* owner)
: owner_(owner) {}
@@ -94,7 +94,7 @@ class LowMemoryListenerImpl
DISALLOW_COPY_AND_ASSIGN(FileWatcherDelegate);
};
- scoped_ptr<MessageLoopForIO::FileDescriptorWatcher> watcher_;
+ scoped_ptr<base::MessageLoopForIO::FileDescriptorWatcher> watcher_;
FileWatcherDelegate watcher_delegate_;
int file_descriptor_;
base::OneShotTimer<LowMemoryListenerImpl> timer_;
@@ -110,7 +110,7 @@ void LowMemoryListenerImpl::StartObservingOnFileThread(
<< "Attempted to start observation when it was already started.";
DCHECK(watcher_.get() == NULL);
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- DCHECK(MessageLoopForIO::current());
+ DCHECK(base::MessageLoopForIO::current());
file_descriptor_ = ::open(kLowMemFile, O_RDONLY);
// Don't report this error unless we're really running on ChromeOS
@@ -119,7 +119,7 @@ void LowMemoryListenerImpl::StartObservingOnFileThread(
PLOG(ERROR) << "Unable to open " << kLowMemFile;
return;
}
- watcher_.reset(new MessageLoopForIO::FileDescriptorWatcher);
+ watcher_.reset(new base::MessageLoopForIO::FileDescriptorWatcher);
StartWatchingDescriptor();
}
@@ -144,13 +144,13 @@ void LowMemoryListenerImpl::ScheduleNextObservation() {
void LowMemoryListenerImpl::StartWatchingDescriptor() {
DCHECK(watcher_.get());
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- DCHECK(MessageLoopForIO::current());
+ DCHECK(base::MessageLoopForIO::current());
if (file_descriptor_ < 0)
return;
- if (!MessageLoopForIO::current()->WatchFileDescriptor(
+ if (!base::MessageLoopForIO::current()->WatchFileDescriptor(
file_descriptor_,
false, // persistent=false: We want it to fire once and reschedule.
- MessageLoopForIO::WATCH_READ,
+ base::MessageLoopForIO::WATCH_READ,
watcher_.get(),
&watcher_delegate_)) {
LOG(ERROR) << "Unable to watch " << kLowMemFile;
« no previous file with comments | « chromeos/login/login_state_unittest.cc ('k') | chromeos/network/cert_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698