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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 profile != ProfileManager::GetActiveUserProfile()) { | 319 profile != ProfileManager::GetActiveUserProfile()) { |
320 return false; | 320 return false; |
321 } | 321 } |
322 | 322 |
323 // Do not pop-up the File Manager, if the recovery tool is running. | 323 // Do not pop-up the File Manager, if the recovery tool is running. |
324 if (IsRecoveryToolRunning(profile)) | 324 if (IsRecoveryToolRunning(profile)) |
325 return false; | 325 return false; |
326 | 326 |
327 // If the disable-default-apps flag is on, Files.app is not opened | 327 // If the disable-default-apps flag is on, Files.app is not opened |
328 // automatically on device mount not to obstruct the manual test. | 328 // automatically on device mount not to obstruct the manual test. |
329 if (CommandLine::ForCurrentProcess()->HasSwitch( | 329 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
330 switches::kDisableDefaultApps)) { | 330 switches::kDisableDefaultApps)) { |
331 return false; | 331 return false; |
332 } | 332 } |
333 | 333 |
334 return true; | 334 return true; |
335 } | 335 } |
336 | 336 |
337 // Sub-part of the event router for handling device events. | 337 // Sub-part of the event router for handling device events. |
338 class DeviceEventRouterImpl : public DeviceEventRouter { | 338 class DeviceEventRouterImpl : public DeviceEventRouter { |
339 public: | 339 public: |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 void EventRouter::SetDispatchDirectoryChangeEventImplForTesting( | 1033 void EventRouter::SetDispatchDirectoryChangeEventImplForTesting( |
1034 const DispatchDirectoryChangeEventImplCallback& callback) { | 1034 const DispatchDirectoryChangeEventImplCallback& callback) { |
1035 dispatch_directory_change_event_impl_ = callback; | 1035 dispatch_directory_change_event_impl_ = callback; |
1036 } | 1036 } |
1037 | 1037 |
1038 base::WeakPtr<EventRouter> EventRouter::GetWeakPtr() { | 1038 base::WeakPtr<EventRouter> EventRouter::GetWeakPtr() { |
1039 return weak_factory_.GetWeakPtr(); | 1039 return weak_factory_.GetWeakPtr(); |
1040 } | 1040 } |
1041 | 1041 |
1042 } // namespace file_manager | 1042 } // namespace file_manager |
OLD | NEW |