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

Unified Diff: chrome/browser/chromeos/memory/low_memory_observer.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/memory/low_memory_observer.cc
diff --git a/chrome/browser/chromeos/memory/low_memory_observer.cc b/chrome/browser/chromeos/memory/low_memory_observer.cc
index 8afa071747ca686185a40ec320200013fb41a4a2..98f9e9aeebfc6ef2d43f07ee3935bfe3b5a70474 100644
--- a/chrome/browser/chromeos/memory/low_memory_observer.cc
+++ b/chrome/browser/chromeos/memory/low_memory_observer.cc
@@ -73,7 +73,7 @@ class LowMemoryObserverImpl
void StartWatchingDescriptor();
// Delegate to receive events from WatchFileDescriptor.
- class FileWatcherDelegate : public MessageLoopForIO::Watcher {
+ class FileWatcherDelegate : public base::MessageLoopForIO::Watcher {
public:
explicit FileWatcherDelegate(LowMemoryObserverImpl* owner)
: owner_(owner) {}
@@ -102,7 +102,7 @@ class LowMemoryObserverImpl
DISALLOW_COPY_AND_ASSIGN(FileWatcherDelegate);
};
- scoped_ptr<MessageLoopForIO::FileDescriptorWatcher> watcher_;
+ scoped_ptr<base::MessageLoopForIO::FileDescriptorWatcher> watcher_;
FileWatcherDelegate watcher_delegate_;
int file_descriptor_;
base::OneShotTimer<LowMemoryObserverImpl> timer_;
@@ -115,7 +115,7 @@ void LowMemoryObserverImpl::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
@@ -124,7 +124,7 @@ void LowMemoryObserverImpl::StartObservingOnFileThread() {
PLOG(ERROR) << "Unable to open " << kLowMemFile;
return;
}
- watcher_.reset(new MessageLoopForIO::FileDescriptorWatcher);
+ watcher_.reset(new base::MessageLoopForIO::FileDescriptorWatcher);
StartWatchingDescriptor();
}
@@ -149,13 +149,13 @@ void LowMemoryObserverImpl::ScheduleNextObservation() {
void LowMemoryObserverImpl::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;

Powered by Google App Engine
This is Rietveld 408576698