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_service_manager.h" | 5 #include "components/arc/arc_service_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 for (auto& observer : manager_->observer_list_) | 44 for (auto& observer : manager_->observer_list_) |
45 observer.OnIntentFiltersUpdated(); | 45 observer.OnIntentFiltersUpdated(); |
46 } | 46 } |
47 | 47 |
48 ArcServiceManager::ArcServiceManager( | 48 ArcServiceManager::ArcServiceManager( |
49 scoped_refptr<base::TaskRunner> blocking_task_runner) | 49 scoped_refptr<base::TaskRunner> blocking_task_runner) |
50 : blocking_task_runner_(blocking_task_runner), | 50 : blocking_task_runner_(blocking_task_runner), |
51 intent_helper_observer_(base::MakeUnique<IntentHelperObserverImpl>(this)), | 51 intent_helper_observer_(base::MakeUnique<IntentHelperObserverImpl>(this)), |
52 arc_bridge_service_(base::MakeUnique<ArcBridgeService>()), | 52 arc_bridge_service_(base::MakeUnique<ArcBridgeService>()), |
53 icon_loader_(new ActivityIconLoader()), | 53 icon_loader_(new ActivityIconLoader()), |
54 activity_resolver_(new LocalActivityResolver()) { | 54 activity_resolver_(new LocalActivityResolver()), |
55 file_system_service_(nullptr) { | |
Luis Héctor Chávez
2017/01/10 18:51:35
nit: can you initialize |file_system_service_ = nu
Shuhei Takahashi
2017/01/11 15:20:43
Done.
| |
55 DCHECK(!g_arc_service_manager); | 56 DCHECK(!g_arc_service_manager); |
56 g_arc_service_manager = this; | 57 g_arc_service_manager = this; |
57 } | 58 } |
58 | 59 |
59 ArcServiceManager::~ArcServiceManager() { | 60 ArcServiceManager::~ArcServiceManager() { |
60 DCHECK(thread_checker_.CalledOnValidThread()); | 61 DCHECK(thread_checker_.CalledOnValidThread()); |
61 DCHECK_EQ(g_arc_service_manager, this); | 62 DCHECK_EQ(g_arc_service_manager, this); |
62 g_arc_service_manager = nullptr; | 63 g_arc_service_manager = nullptr; |
63 } | 64 } |
64 | 65 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 // Before actual shutdown, notify observers for clean up. | 97 // Before actual shutdown, notify observers for clean up. |
97 for (auto& observer : observer_list_) | 98 for (auto& observer : observer_list_) |
98 observer.OnArcShutdown(); | 99 observer.OnArcShutdown(); |
99 | 100 |
100 icon_loader_ = nullptr; | 101 icon_loader_ = nullptr; |
101 activity_resolver_ = nullptr; | 102 activity_resolver_ = nullptr; |
102 services_.clear(); | 103 services_.clear(); |
103 } | 104 } |
104 | 105 |
105 } // namespace arc | 106 } // namespace arc |
OLD | NEW |