| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/ppapi_plugin/ppapi_thread.h" | 5 #include "content/ppapi_plugin/ppapi_thread.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; | 143 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; |
| 144 if (IsRunningInMash()) { | 144 if (IsRunningInMash()) { |
| 145 #if defined(USE_AURA) | 145 #if defined(USE_AURA) |
| 146 GetServiceManagerConnection()->GetConnector()->ConnectToInterface( | 146 GetServiceManagerConnection()->GetConnector()->ConnectToInterface( |
| 147 ui::mojom::kServiceName, &manager_ptr); | 147 ui::mojom::kServiceName, &manager_ptr); |
| 148 #else | 148 #else |
| 149 NOTREACHED(); | 149 NOTREACHED(); |
| 150 #endif | 150 #endif |
| 151 } else { | 151 } else { |
| 152 ChildThread::Get()->GetRemoteInterfaces()->GetInterface( | 152 ChildThread::Get()->GetRemoteInterfaces()->GetInterface( |
| 153 mojo::GetProxy(&manager_ptr)); | 153 mojo::MakeRequest(&manager_ptr)); |
| 154 } | 154 } |
| 155 discardable_shared_memory_manager_ = base::MakeUnique< | 155 discardable_shared_memory_manager_ = base::MakeUnique< |
| 156 discardable_memory::ClientDiscardableSharedMemoryManager>( | 156 discardable_memory::ClientDiscardableSharedMemoryManager>( |
| 157 std::move(manager_ptr), GetIOTaskRunner()); | 157 std::move(manager_ptr), GetIOTaskRunner()); |
| 158 base::DiscardableMemoryAllocator::SetInstance( | 158 base::DiscardableMemoryAllocator::SetInstance( |
| 159 discardable_shared_memory_manager_.get()); | 159 discardable_shared_memory_manager_.get()); |
| 160 } | 160 } |
| 161 field_trial_syncer_.InitFieldTrialObserving(command_line, | 161 field_trial_syncer_.InitFieldTrialObserving(command_line, |
| 162 switches::kSingleProcess); | 162 switches::kSingleProcess); |
| 163 } | 163 } |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 GetHistogramName(is_broker_, "LoadTime", path), | 604 GetHistogramName(is_broker_, "LoadTime", path), |
| 605 base::TimeDelta::FromMilliseconds(1), | 605 base::TimeDelta::FromMilliseconds(1), |
| 606 base::TimeDelta::FromSeconds(10), | 606 base::TimeDelta::FromSeconds(10), |
| 607 50, | 607 50, |
| 608 base::HistogramBase::kUmaTargetedHistogramFlag); | 608 base::HistogramBase::kUmaTargetedHistogramFlag); |
| 609 | 609 |
| 610 histogram->AddTime(load_time); | 610 histogram->AddTime(load_time); |
| 611 } | 611 } |
| 612 | 612 |
| 613 } // namespace content | 613 } // namespace content |
| OLD | NEW |