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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
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/bookmarks/imported_bookmark_entry.h" 9 #include "chrome/browser/bookmarks/imported_bookmark_entry.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
255 255
256 void ExternalProcessImporterClient::NotifyItemFinishedOnIOThread( 256 void ExternalProcessImporterClient::NotifyItemFinishedOnIOThread(
257 importer::ImportItem import_item) { 257 importer::ImportItem import_item) {
258 utility_process_host_->Send( 258 utility_process_host_->Send(
259 new ProfileImportProcessMsg_ReportImportItemFinished(import_item)); 259 new ProfileImportProcessMsg_ReportImportItemFinished(import_item));
260 } 260 }
261 261
262 void ExternalProcessImporterClient::StartProcessOnIOThread( 262 void ExternalProcessImporterClient::StartProcessOnIOThread(
263 BrowserThread::ID thread_id) { 263 BrowserThread::ID thread_id) {
264 utility_process_host_ = 264 utility_process_host_ = UtilityProcessHost::Create(
265 UtilityProcessHost::Create( 265 this, BrowserThread::GetMessageLoopProxyForThread(thread_id).get())
266 this, 266 ->AsWeakPtr();
267 BrowserThread::GetMessageLoopProxyForThread(thread_id))->AsWeakPtr();
268 utility_process_host_->DisableSandbox(); 267 utility_process_host_->DisableSandbox();
269 268
270 #if defined(OS_MACOSX) 269 #if defined(OS_MACOSX)
271 base::EnvironmentVector env; 270 base::EnvironmentVector env;
272 std::string dylib_path = GetFirefoxDylibPath().value(); 271 std::string dylib_path = GetFirefoxDylibPath().value();
273 if (!dylib_path.empty()) 272 if (!dylib_path.empty())
274 env.push_back(std::make_pair("DYLD_FALLBACK_LIBRARY_PATH", dylib_path)); 273 env.push_back(std::make_pair("DYLD_FALLBACK_LIBRARY_PATH", dylib_path));
275 utility_process_host_->SetEnv(env); 274 utility_process_host_->SetEnv(env);
276 #endif 275 #endif
277 276
(...skipping 15 matching lines...) Expand all
293 localized_strings.SetString( 292 localized_strings.SetString(
294 base::IntToString(IDS_IMPORT_FROM_SAFARI), 293 base::IntToString(IDS_IMPORT_FROM_SAFARI),
295 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI)); 294 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI));
296 localized_strings.SetString( 295 localized_strings.SetString(
297 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME), 296 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME),
298 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME)); 297 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME));
299 298
300 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport( 299 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport(
301 source_profile_, items_, localized_strings)); 300 source_profile_, items_, localized_strings));
302 } 301 }
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites_backend.cc ('k') | chrome/browser/importer/firefox_importer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698