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

Side by Side Diff: content/browser/browser_context.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 3 years, 12 months 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
OLDNEW
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/public/browser/browser_context.h" 5 #include "content/public/browser/browser_context.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 new base::SupportsUserData::Data); 432 new base::SupportsUserData::Data);
433 433
434 ServiceManagerConnection* service_manager_connection = 434 ServiceManagerConnection* service_manager_connection =
435 ServiceManagerConnection::GetForProcess(); 435 ServiceManagerConnection::GetForProcess();
436 if (service_manager_connection && base::ThreadTaskRunnerHandle::IsSet()) { 436 if (service_manager_connection && base::ThreadTaskRunnerHandle::IsSet()) {
437 // NOTE: Many unit tests create a TestBrowserContext without initializing 437 // NOTE: Many unit tests create a TestBrowserContext without initializing
438 // Mojo or the global service manager connection. 438 // Mojo or the global service manager connection.
439 439
440 service_manager::mojom::ServicePtr service; 440 service_manager::mojom::ServicePtr service;
441 service_manager::mojom::ServiceRequest service_request = 441 service_manager::mojom::ServiceRequest service_request =
442 mojo::GetProxy(&service); 442 mojo::MakeRequest(&service);
443 443
444 service_manager::mojom::PIDReceiverPtr pid_receiver; 444 service_manager::mojom::PIDReceiverPtr pid_receiver;
445 service_manager::Connector::ConnectParams params( 445 service_manager::Connector::ConnectParams params(
446 service_manager::Identity(mojom::kBrowserServiceName, new_id)); 446 service_manager::Identity(mojom::kBrowserServiceName, new_id));
447 params.set_client_process_connection(std::move(service), 447 params.set_client_process_connection(std::move(service),
448 mojo::GetProxy(&pid_receiver)); 448 mojo::MakeRequest(&pid_receiver));
449 pid_receiver->SetPID(base::GetCurrentProcId()); 449 pid_receiver->SetPID(base::GetCurrentProcId());
450 450
451 BrowserContextServiceManagerConnectionHolder* connection_holder = 451 BrowserContextServiceManagerConnectionHolder* connection_holder =
452 new BrowserContextServiceManagerConnectionHolder( 452 new BrowserContextServiceManagerConnectionHolder(
453 service_manager_connection->GetConnector()->Connect(&params), 453 service_manager_connection->GetConnector()->Connect(&params),
454 std::move(service_request)); 454 std::move(service_request));
455 browser_context->SetUserData(kServiceManagerConnection, connection_holder); 455 browser_context->SetUserData(kServiceManagerConnection, connection_holder);
456 456
457 ServiceManagerConnection* connection = 457 ServiceManagerConnection* connection =
458 connection_holder->service_manager_connection(); 458 connection_holder->service_manager_connection();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 if (GetUserData(kDownloadManagerKeyName)) 529 if (GetUserData(kDownloadManagerKeyName))
530 GetDownloadManager(this)->Shutdown(); 530 GetDownloadManager(this)->Shutdown();
531 } 531 }
532 532
533 void BrowserContext::ShutdownStoragePartitions() { 533 void BrowserContext::ShutdownStoragePartitions() {
534 if (GetUserData(kStoragePartitionMapKeyName)) 534 if (GetUserData(kStoragePartitionMapKeyName))
535 RemoveUserData(kStoragePartitionMapKeyName); 535 RemoveUserData(kStoragePartitionMapKeyName);
536 } 536 }
537 537
538 } // namespace content 538 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698