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

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

Issue 22750002: Move AlterEnvironment to base/environment.h, implement on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « base/process/process_util_unittest.cc ('k') | chrome/browser/nacl_host/nacl_process_host.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 "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/importer/external_process_importer_host.h" 10 #include "chrome/browser/importer/external_process_importer_host.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 278 }
279 279
280 void ExternalProcessImporterClient::StartProcessOnIOThread( 280 void ExternalProcessImporterClient::StartProcessOnIOThread(
281 BrowserThread::ID thread_id) { 281 BrowserThread::ID thread_id) {
282 utility_process_host_ = UtilityProcessHost::Create( 282 utility_process_host_ = UtilityProcessHost::Create(
283 this, BrowserThread::GetMessageLoopProxyForThread(thread_id).get()) 283 this, BrowserThread::GetMessageLoopProxyForThread(thread_id).get())
284 ->AsWeakPtr(); 284 ->AsWeakPtr();
285 utility_process_host_->DisableSandbox(); 285 utility_process_host_->DisableSandbox();
286 286
287 #if defined(OS_MACOSX) 287 #if defined(OS_MACOSX)
288 base::EnvironmentVector env; 288 base::EnvironmentMap env;
289 std::string dylib_path = GetFirefoxDylibPath().value(); 289 std::string dylib_path = GetFirefoxDylibPath().value();
290 if (!dylib_path.empty()) 290 if (!dylib_path.empty())
291 env.push_back(std::make_pair("DYLD_FALLBACK_LIBRARY_PATH", dylib_path)); 291 env["DYLD_FALLBACK_LIBRARY_PATH"] = dylib_path;
292 utility_process_host_->SetEnv(env); 292 utility_process_host_->SetEnv(env);
293 #endif 293 #endif
294 294
295 // Dictionary of all localized strings that could be needed by the importer 295 // Dictionary of all localized strings that could be needed by the importer
296 // in the external process. 296 // in the external process.
297 DictionaryValue localized_strings; 297 DictionaryValue localized_strings;
298 localized_strings.SetString( 298 localized_strings.SetString(
299 base::IntToString(IDS_BOOKMARK_GROUP), 299 base::IntToString(IDS_BOOKMARK_GROUP),
300 l10n_util::GetStringUTF8(IDS_BOOKMARK_GROUP)); 300 l10n_util::GetStringUTF8(IDS_BOOKMARK_GROUP));
301 localized_strings.SetString( 301 localized_strings.SetString(
(...skipping 11 matching lines...) Expand all
313 localized_strings.SetString( 313 localized_strings.SetString(
314 base::IntToString(IDS_IMPORT_FROM_SAFARI), 314 base::IntToString(IDS_IMPORT_FROM_SAFARI),
315 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI)); 315 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI));
316 localized_strings.SetString( 316 localized_strings.SetString(
317 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME), 317 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME),
318 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME)); 318 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME));
319 319
320 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport( 320 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport(
321 source_profile_, items_, localized_strings)); 321 source_profile_, items_, localized_strings));
322 } 322 }
OLDNEW
« no previous file with comments | « base/process/process_util_unittest.cc ('k') | chrome/browser/nacl_host/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698