| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_manager/event_router.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/event_router.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 EventRouter::~EventRouter() { | 390 EventRouter::~EventRouter() { |
| 391 } | 391 } |
| 392 | 392 |
| 393 void EventRouter::Shutdown() { | 393 void EventRouter::Shutdown() { |
| 394 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 394 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 395 chromeos::system::TimezoneSettings::GetInstance()->RemoveObserver(this); | 395 chromeos::system::TimezoneSettings::GetInstance()->RemoveObserver(this); |
| 396 | 396 |
| 397 DLOG_IF(WARNING, !file_watchers_.empty()) | 397 DLOG_IF(WARNING, !file_watchers_.empty()) |
| 398 << "Not all file watchers are " | 398 << "Not all file watchers are " |
| 399 << "removed. This can happen when Files.app is open during shutdown."; | 399 << "removed. This can happen when Files.app is open during shutdown."; |
| 400 STLDeleteValues(&file_watchers_); | 400 base::STLDeleteValues(&file_watchers_); |
| 401 if (!profile_) { | 401 if (!profile_) { |
| 402 NOTREACHED(); | 402 NOTREACHED(); |
| 403 return; | 403 return; |
| 404 } | 404 } |
| 405 | 405 |
| 406 pref_change_registrar_->RemoveAll(); | 406 pref_change_registrar_->RemoveAll(); |
| 407 | 407 |
| 408 if (NetworkHandler::IsInitialized()) { | 408 if (NetworkHandler::IsInitialized()) { |
| 409 NetworkHandler::Get()->network_state_handler()->RemoveObserver(this, | 409 NetworkHandler::Get()->network_state_handler()->RemoveObserver(this, |
| 410 FROM_HERE); | 410 FROM_HERE); |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 void EventRouter::SetDispatchDirectoryChangeEventImplForTesting( | 977 void EventRouter::SetDispatchDirectoryChangeEventImplForTesting( |
| 978 const DispatchDirectoryChangeEventImplCallback& callback) { | 978 const DispatchDirectoryChangeEventImplCallback& callback) { |
| 979 dispatch_directory_change_event_impl_ = callback; | 979 dispatch_directory_change_event_impl_ = callback; |
| 980 } | 980 } |
| 981 | 981 |
| 982 base::WeakPtr<EventRouter> EventRouter::GetWeakPtr() { | 982 base::WeakPtr<EventRouter> EventRouter::GetWeakPtr() { |
| 983 return weak_factory_.GetWeakPtr(); | 983 return weak_factory_.GetWeakPtr(); |
| 984 } | 984 } |
| 985 | 985 |
| 986 } // namespace file_manager | 986 } // namespace file_manager |
| OLD | NEW |