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

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

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « chrome/browser/history/top_sites_factory.cc ('k') | chrome/browser/io_thread.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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } 303 }
304 304
305 void ExternalProcessImporterClient::NotifyItemFinishedOnIOThread( 305 void ExternalProcessImporterClient::NotifyItemFinishedOnIOThread(
306 importer::ImportItem import_item) { 306 importer::ImportItem import_item) {
307 utility_process_host_->Send( 307 utility_process_host_->Send(
308 new ProfileImportProcessMsg_ReportImportItemFinished(import_item)); 308 new ProfileImportProcessMsg_ReportImportItemFinished(import_item));
309 } 309 }
310 310
311 void ExternalProcessImporterClient::StartProcessOnIOThread( 311 void ExternalProcessImporterClient::StartProcessOnIOThread(
312 BrowserThread::ID thread_id) { 312 BrowserThread::ID thread_id) {
313 utility_process_host_ = UtilityProcessHost::Create( 313 utility_process_host_ =
314 this, BrowserThread::GetMessageLoopProxyForThread(thread_id).get()) 314 UtilityProcessHost::Create(
315 ->AsWeakPtr(); 315 this, BrowserThread::GetTaskRunnerForThread(thread_id).get())
316 ->AsWeakPtr();
316 utility_process_host_->SetName(l10n_util::GetStringUTF16( 317 utility_process_host_->SetName(l10n_util::GetStringUTF16(
317 IDS_UTILITY_PROCESS_PROFILE_IMPORTER_NAME)); 318 IDS_UTILITY_PROCESS_PROFILE_IMPORTER_NAME));
318 utility_process_host_->DisableSandbox(); 319 utility_process_host_->DisableSandbox();
319 320
320 #if defined(OS_MACOSX) 321 #if defined(OS_MACOSX)
321 base::EnvironmentMap env; 322 base::EnvironmentMap env;
322 std::string dylib_path = GetFirefoxDylibPath().value(); 323 std::string dylib_path = GetFirefoxDylibPath().value();
323 if (!dylib_path.empty()) 324 if (!dylib_path.empty())
324 env["DYLD_FALLBACK_LIBRARY_PATH"] = dylib_path; 325 env["DYLD_FALLBACK_LIBRARY_PATH"] = dylib_path;
325 utility_process_host_->SetEnv(env); 326 utility_process_host_->SetEnv(env);
(...skipping 20 matching lines...) Expand all
346 localized_strings.SetString( 347 localized_strings.SetString(
347 base::IntToString(IDS_IMPORT_FROM_SAFARI), 348 base::IntToString(IDS_IMPORT_FROM_SAFARI),
348 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI)); 349 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI));
349 localized_strings.SetString( 350 localized_strings.SetString(
350 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME), 351 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME),
351 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME)); 352 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME));
352 353
353 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport( 354 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport(
354 source_profile_, items_, localized_strings)); 355 source_profile_, items_, localized_strings));
355 } 356 }
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites_factory.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698