| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 channel()->AddFilter(plugin_filter.get()); | 137 channel()->AddFilter(plugin_filter.get()); |
| 138 plugin_globals_.RegisterResourceMessageFilters(plugin_filter.get()); | 138 plugin_globals_.RegisterResourceMessageFilters(plugin_filter.get()); |
| 139 } | 139 } |
| 140 | 140 |
| 141 // In single process, browser main loop set up the discardable memory | 141 // In single process, browser main loop set up the discardable memory |
| 142 // allocator. | 142 // allocator. |
| 143 if (!command_line.HasSwitch(switches::kSingleProcess)) { | 143 if (!command_line.HasSwitch(switches::kSingleProcess)) { |
| 144 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; | 144 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; |
| 145 if (IsRunningInMash()) { | 145 if (IsRunningInMash()) { |
| 146 #if defined(USE_AURA) | 146 #if defined(USE_AURA) |
| 147 GetServiceManagerConnection()->GetConnector()->ConnectToInterface( | 147 GetServiceManagerConnection()->GetConnector()->BindInterface( |
| 148 ui::mojom::kServiceName, &manager_ptr); | 148 ui::mojom::kServiceName, &manager_ptr); |
| 149 #else | 149 #else |
| 150 NOTREACHED(); | 150 NOTREACHED(); |
| 151 #endif | 151 #endif |
| 152 } else { | 152 } else { |
| 153 ChildThread::Get()->GetRemoteInterfaces()->GetInterface( | 153 ChildThread::Get()->GetRemoteInterfaces()->GetInterface( |
| 154 mojo::MakeRequest(&manager_ptr)); | 154 mojo::MakeRequest(&manager_ptr)); |
| 155 } | 155 } |
| 156 discardable_shared_memory_manager_ = base::MakeUnique< | 156 discardable_shared_memory_manager_ = base::MakeUnique< |
| 157 discardable_memory::ClientDiscardableSharedMemoryManager>( | 157 discardable_memory::ClientDiscardableSharedMemoryManager>( |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 GetHistogramName(is_broker_, "LoadTime", path), | 605 GetHistogramName(is_broker_, "LoadTime", path), |
| 606 base::TimeDelta::FromMilliseconds(1), | 606 base::TimeDelta::FromMilliseconds(1), |
| 607 base::TimeDelta::FromSeconds(10), | 607 base::TimeDelta::FromSeconds(10), |
| 608 50, | 608 50, |
| 609 base::HistogramBase::kUmaTargetedHistogramFlag); | 609 base::HistogramBase::kUmaTargetedHistogramFlag); |
| 610 | 610 |
| 611 histogram->AddTime(load_time); | 611 histogram->AddTime(load_time); |
| 612 } | 612 } |
| 613 | 613 |
| 614 } // namespace content | 614 } // namespace content |
| OLD | NEW |