Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2589253002: Remove discardable_memory::DSMM::{Create,Get}Instance() (Closed)
Patch Set: Fix trybot Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/renderer/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 1298
1299 // This is to support usage of WebSockets in cases in which there is no 1299 // This is to support usage of WebSockets in cases in which there is no
1300 // associated RenderFrame (e.g., Shared Workers). 1300 // associated RenderFrame (e.g., Shared Workers).
1301 AddUIThreadInterface( 1301 AddUIThreadInterface(
1302 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(), 1302 registry.get(), base::Bind(&WebSocketManager::CreateWebSocket, GetID(),
1303 MSG_ROUTING_NONE)); 1303 MSG_ROUTING_NONE));
1304 1304
1305 // Chrome browser process only provides DiscardableSharedMemory service when 1305 // Chrome browser process only provides DiscardableSharedMemory service when
1306 // Chrome is not running in mus+ash. 1306 // Chrome is not running in mus+ash.
1307 if (!service_manager::ServiceManagerIsRemote()) { 1307 if (!service_manager::ServiceManagerIsRemote()) {
1308 registry->AddInterface(base::Bind( 1308 discardable_memory::DiscardableSharedMemoryManager* manager =
1309 &discardable_memory::DiscardableSharedMemoryManager::Bind, 1309 BrowserMainLoop::GetInstance()->discardable_shared_memory_manager();
1310 base::Unretained(discardable_memory::DiscardableSharedMemoryManager:: 1310 registry->AddInterface(
1311 GetInstance()))); 1311 base::Bind(&discardable_memory::DiscardableSharedMemoryManager::Bind,
1312 base::Unretained(manager)));
1312 } 1313 }
1313 1314
1314 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(), 1315 GetContentClient()->browser()->ExposeInterfacesToRenderer(registry.get(),
1315 this); 1316 this);
1316 1317
1317 ServiceManagerConnection* service_manager_connection = 1318 ServiceManagerConnection* service_manager_connection =
1318 BrowserContext::GetServiceManagerConnectionFor(browser_context_); 1319 BrowserContext::GetServiceManagerConnectionFor(browser_context_);
1319 std::unique_ptr<ConnectionFilterImpl> connection_filter( 1320 std::unique_ptr<ConnectionFilterImpl> connection_filter(
1320 new ConnectionFilterImpl(child_connection_->child_identity(), 1321 new ConnectionFilterImpl(child_connection_->child_identity(),
1321 std::move(registry))); 1322 std::move(registry)));
(...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after
3022 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3023 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3023 3024
3024 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3025 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3025 // Capture the error message in a crash key value. 3026 // Capture the error message in a crash key value.
3026 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3027 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3027 bad_message::ReceivedBadMessage(render_process_id, 3028 bad_message::ReceivedBadMessage(render_process_id,
3028 bad_message::RPH_MOJO_PROCESS_ERROR); 3029 bad_message::RPH_MOJO_PROCESS_ERROR);
3029 } 3030 }
3030 3031
3031 } // namespace content 3032 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/renderer/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698