| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/arc/arc_bridge_service_impl.h" | 5 #include "components/arc/arc_bridge_service_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
| 12 #include "base/sequenced_task_runner.h" | 12 #include "base/sequenced_task_runner.h" |
| 13 #include "base/sys_info.h" | 13 #include "base/sys_info.h" |
| 14 #include "base/task_runner_util.h" | 14 #include "base/task_runner_util.h" |
| 15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "chromeos/chromeos_switches.h" | 17 #include "chromeos/chromeos_switches.h" |
| 18 #include "chromeos/dbus/dbus_method_call_status.h" | 18 #include "chromeos/dbus/dbus_method_call_status.h" |
| 19 #include "chromeos/dbus/dbus_thread_manager.h" | 19 #include "chromeos/dbus/dbus_thread_manager.h" |
| 20 #include "components/arc/arc_session.h" |
| 20 #include "components/prefs/pref_registry_simple.h" | 21 #include "components/prefs/pref_registry_simple.h" |
| 21 #include "components/prefs/pref_service.h" | 22 #include "components/prefs/pref_service.h" |
| 22 | 23 |
| 23 namespace arc { | 24 namespace arc { |
| 24 namespace { | 25 namespace { |
| 25 constexpr int64_t kReconnectDelayInSeconds = 5; | 26 constexpr int64_t kReconnectDelayInSeconds = 5; |
| 26 } // namespace | 27 } // namespace |
| 27 | 28 |
| 28 ArcBridgeServiceImpl::ArcBridgeServiceImpl( | 29 ArcBridgeServiceImpl::ArcBridgeServiceImpl( |
| 29 const scoped_refptr<base::TaskRunner>& blocking_task_runner) | 30 const scoped_refptr<base::TaskRunner>& blocking_task_runner) |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 weak_factory_.GetWeakPtr()), | 156 weak_factory_.GetWeakPtr()), |
| 156 base::TimeDelta::FromSeconds(kReconnectDelayInSeconds)); | 157 base::TimeDelta::FromSeconds(kReconnectDelayInSeconds)); |
| 157 } else { | 158 } else { |
| 158 // Restart immediately. | 159 // Restart immediately. |
| 159 PrerequisitesChanged(); | 160 PrerequisitesChanged(); |
| 160 } | 161 } |
| 161 } | 162 } |
| 162 } | 163 } |
| 163 | 164 |
| 164 } // namespace arc | 165 } // namespace arc |
| OLD | NEW |