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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/prefs/pref_change_registrar.h" | 10 #include "base/prefs/pref_change_registrar.h" |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 const drive::JobInfo& info, const std::string& status) | 365 const drive::JobInfo& info, const std::string& status) |
366 : job_info(info), status(status) { | 366 : job_info(info), status(status) { |
367 } | 367 } |
368 | 368 |
369 EventRouter::EventRouter(Profile* profile) | 369 EventRouter::EventRouter(Profile* profile) |
370 : pref_change_registrar_(new PrefChangeRegistrar), | 370 : pref_change_registrar_(new PrefChangeRegistrar), |
371 profile_(profile), | 371 profile_(profile), |
372 device_event_router_(new DeviceEventRouterImpl(profile)), | 372 device_event_router_(new DeviceEventRouterImpl(profile)), |
373 weak_factory_(this) { | 373 weak_factory_(this) { |
374 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 374 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 375 ObserveEvents(); |
375 } | 376 } |
376 | 377 |
377 EventRouter::~EventRouter() { | 378 EventRouter::~EventRouter() { |
378 } | 379 } |
379 | 380 |
380 void EventRouter::Shutdown() { | 381 void EventRouter::Shutdown() { |
381 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 382 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
382 | 383 |
383 DLOG_IF(WARNING, !file_watchers_.empty()) | 384 DLOG_IF(WARNING, !file_watchers_.empty()) |
384 << "Not all file watchers are " | 385 << "Not all file watchers are " |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 // Do nothing. | 931 // Do nothing. |
931 } | 932 } |
932 | 933 |
933 void EventRouter::OnFormatCompleted(const std::string& device_path, | 934 void EventRouter::OnFormatCompleted(const std::string& device_path, |
934 bool success) { | 935 bool success) { |
935 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 936 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
936 // Do nothing. | 937 // Do nothing. |
937 } | 938 } |
938 | 939 |
939 } // namespace file_manager | 940 } // namespace file_manager |
OLD | NEW |