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

Side by Side Diff: chrome/browser/importer/external_process_importer_client.cc

Issue 2592623002: mojo:: Introduce InterfaceRequest ctor that takes in InterfacePtr* (Closed)
Patch Set: Rebase + response to review 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 | « no previous file | chrome/browser/task_manager/providers/child_process_task.cc » ('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 (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 "chrome/browser/importer/external_process_importer_client.h" 5 #include "chrome/browser/importer/external_process_importer_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 26 matching lines...) Expand all
37 items_(items), 37 items_(items),
38 bridge_(bridge), 38 bridge_(bridge),
39 cancelled_(false), 39 cancelled_(false),
40 binding_(this) { 40 binding_(this) {
41 process_importer_host_->NotifyImportStarted(); 41 process_importer_host_->NotifyImportStarted();
42 } 42 }
43 43
44 void ExternalProcessImporterClient::Start() { 44 void ExternalProcessImporterClient::Start() {
45 AddRef(); // balanced in Cleanup. 45 AddRef(); // balanced in Cleanup.
46 46
47 chrome::mojom::ProfileImportRequest request = 47 chrome::mojom::ProfileImportRequest request(&profile_import_);
48 mojo::MakeRequest(&profile_import_);
49 48
50 BrowserThread::ID thread_id; 49 BrowserThread::ID thread_id;
51 CHECK(BrowserThread::GetCurrentThreadIdentifier(&thread_id)); 50 CHECK(BrowserThread::GetCurrentThreadIdentifier(&thread_id));
52 BrowserThread::PostTask( 51 BrowserThread::PostTask(
53 BrowserThread::IO, FROM_HERE, 52 BrowserThread::IO, FROM_HERE,
54 base::Bind(&ExternalProcessImporterClient::StartProcessOnIOThread, this, 53 base::Bind(&ExternalProcessImporterClient::StartProcessOnIOThread, this,
55 thread_id, base::Passed(std::move(request)))); 54 thread_id, base::Passed(std::move(request))));
56 55
57 // Dictionary of all localized strings that could be needed by the importer 56 // Dictionary of all localized strings that could be needed by the importer
58 // in the external process. 57 // in the external process.
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 utility_process_host_->Start(); 308 utility_process_host_->Start();
310 chrome::mojom::ProfileImportPtr profile_import; 309 chrome::mojom::ProfileImportPtr profile_import;
311 utility_process_host_->GetRemoteInterfaces()->GetInterface( 310 utility_process_host_->GetRemoteInterfaces()->GetInterface(
312 std::move(request)); 311 std::move(request));
313 } 312 }
314 313
315 void ExternalProcessImporterClient::CloseMojoHandles() { 314 void ExternalProcessImporterClient::CloseMojoHandles() {
316 profile_import_.reset(); 315 profile_import_.reset();
317 binding_.Close(); 316 binding_.Close();
318 } 317 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/task_manager/providers/child_process_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698