OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" | 5 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // Undo any previous resets. | 162 // Undo any previous resets. |
163 weak_factory_.InvalidateWeakPtrs(); | 163 weak_factory_.InvalidateWeakPtrs(); |
164 base::MessageLoopProxy::current()->PostDelayedTask( | 164 base::MessageLoopProxy::current()->PostDelayedTask( |
165 FROM_HERE, | 165 FROM_HERE, |
166 base::Bind(&SuspendStateDelegateImpl::Reset, | 166 base::Bind(&SuspendStateDelegateImpl::Reset, |
167 weak_factory_.GetWeakPtr()), | 167 weak_factory_.GetWeakPtr()), |
168 base::TimeDelta::FromSeconds(5)); | 168 base::TimeDelta::FromSeconds(5)); |
169 } | 169 } |
170 | 170 |
171 // chromeos::SessionManagerClient::Observer implementation. | 171 // chromeos::SessionManagerClient::Observer implementation. |
172 virtual void ScreenIsUnlocked() { | 172 virtual void ScreenIsUnlocked() OVERRIDE { |
173 is_resuming_ = true; | 173 is_resuming_ = true; |
174 // Undo any previous resets. | 174 // Undo any previous resets. |
175 weak_factory_.InvalidateWeakPtrs(); | 175 weak_factory_.InvalidateWeakPtrs(); |
176 base::MessageLoopProxy::current()->PostDelayedTask( | 176 base::MessageLoopProxy::current()->PostDelayedTask( |
177 FROM_HERE, | 177 FROM_HERE, |
178 base::Bind(&SuspendStateDelegateImpl::Reset, | 178 base::Bind(&SuspendStateDelegateImpl::Reset, |
179 weak_factory_.GetWeakPtr()), | 179 weak_factory_.GetWeakPtr()), |
180 base::TimeDelta::FromSeconds(5)); | 180 base::TimeDelta::FromSeconds(5)); |
181 } | 181 } |
182 | 182 |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 } | 951 } |
952 | 952 |
953 bool FileBrowserEventRouter::FileWatcherExtensions::Watch( | 953 bool FileBrowserEventRouter::FileWatcherExtensions::Watch( |
954 const base::FilePath& path, | 954 const base::FilePath& path, |
955 const base::FilePathWatcher::Callback& callback) { | 955 const base::FilePathWatcher::Callback& callback) { |
956 if (is_remote_file_system_) | 956 if (is_remote_file_system_) |
957 return true; | 957 return true; |
958 | 958 |
959 return file_watcher_->Watch(path, false, callback); | 959 return file_watcher_->Watch(path, false, callback); |
960 } | 960 } |
OLD | NEW |