OLD | NEW |
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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 #if defined(OS_MACOSX) | 290 #if defined(OS_MACOSX) |
291 base::EnvironmentMap env; | 291 base::EnvironmentMap env; |
292 std::string dylib_path = GetFirefoxDylibPath().value(); | 292 std::string dylib_path = GetFirefoxDylibPath().value(); |
293 if (!dylib_path.empty()) | 293 if (!dylib_path.empty()) |
294 env["DYLD_FALLBACK_LIBRARY_PATH"] = dylib_path; | 294 env["DYLD_FALLBACK_LIBRARY_PATH"] = dylib_path; |
295 utility_process_host_->SetEnv(env); | 295 utility_process_host_->SetEnv(env); |
296 #endif | 296 #endif |
297 | 297 |
298 // Dictionary of all localized strings that could be needed by the importer | 298 // Dictionary of all localized strings that could be needed by the importer |
299 // in the external process. | 299 // in the external process. |
300 DictionaryValue localized_strings; | 300 base::DictionaryValue localized_strings; |
301 localized_strings.SetString( | 301 localized_strings.SetString( |
302 base::IntToString(IDS_BOOKMARK_GROUP), | 302 base::IntToString(IDS_BOOKMARK_GROUP), |
303 l10n_util::GetStringUTF8(IDS_BOOKMARK_GROUP)); | 303 l10n_util::GetStringUTF8(IDS_BOOKMARK_GROUP)); |
304 localized_strings.SetString( | 304 localized_strings.SetString( |
305 base::IntToString(IDS_BOOKMARK_GROUP_FROM_FIREFOX), | 305 base::IntToString(IDS_BOOKMARK_GROUP_FROM_FIREFOX), |
306 l10n_util::GetStringUTF8(IDS_BOOKMARK_GROUP_FROM_FIREFOX)); | 306 l10n_util::GetStringUTF8(IDS_BOOKMARK_GROUP_FROM_FIREFOX)); |
307 localized_strings.SetString( | 307 localized_strings.SetString( |
308 base::IntToString(IDS_BOOKMARK_GROUP_FROM_SAFARI), | 308 base::IntToString(IDS_BOOKMARK_GROUP_FROM_SAFARI), |
309 l10n_util::GetStringUTF8(IDS_BOOKMARK_GROUP_FROM_SAFARI)); | 309 l10n_util::GetStringUTF8(IDS_BOOKMARK_GROUP_FROM_SAFARI)); |
310 localized_strings.SetString( | 310 localized_strings.SetString( |
311 base::IntToString(IDS_IMPORT_FROM_FIREFOX), | 311 base::IntToString(IDS_IMPORT_FROM_FIREFOX), |
312 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_FIREFOX)); | 312 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_FIREFOX)); |
313 localized_strings.SetString( | 313 localized_strings.SetString( |
314 base::IntToString(IDS_IMPORT_FROM_ICEWEASEL), | 314 base::IntToString(IDS_IMPORT_FROM_ICEWEASEL), |
315 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_ICEWEASEL)); | 315 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_ICEWEASEL)); |
316 localized_strings.SetString( | 316 localized_strings.SetString( |
317 base::IntToString(IDS_IMPORT_FROM_SAFARI), | 317 base::IntToString(IDS_IMPORT_FROM_SAFARI), |
318 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI)); | 318 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI)); |
319 localized_strings.SetString( | 319 localized_strings.SetString( |
320 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME), | 320 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME), |
321 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME)); | 321 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME)); |
322 | 322 |
323 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport( | 323 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport( |
324 source_profile_, items_, localized_strings)); | 324 source_profile_, items_, localized_strings)); |
325 } | 325 } |
OLD | NEW |