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

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

Issue 15987009: Update chrome/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 void ExternalProcessImporterClient::Cleanup() { 242 void ExternalProcessImporterClient::Cleanup() {
243 if (cancelled_) 243 if (cancelled_)
244 return; 244 return;
245 245
246 if (process_importer_host_) 246 if (process_importer_host_)
247 process_importer_host_->NotifyImportEnded(); 247 process_importer_host_->NotifyImportEnded();
248 Release(); 248 Release();
249 } 249 }
250 250
251 void ExternalProcessImporterClient::CancelImportProcessOnIOThread() { 251 void ExternalProcessImporterClient::CancelImportProcessOnIOThread() {
252 if (utility_process_host_) 252 if (utility_process_host_.get())
253 utility_process_host_->Send(new ProfileImportProcessMsg_CancelImport()); 253 utility_process_host_->Send(new ProfileImportProcessMsg_CancelImport());
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(
(...skipping 30 matching lines...) Expand all
293 localized_strings.SetString( 293 localized_strings.SetString(
294 base::IntToString(IDS_IMPORT_FROM_SAFARI), 294 base::IntToString(IDS_IMPORT_FROM_SAFARI),
295 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI)); 295 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI));
296 localized_strings.SetString( 296 localized_strings.SetString(
297 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME), 297 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME),
298 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME)); 298 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME));
299 299
300 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport( 300 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport(
301 source_profile_, items_, localized_strings)); 301 source_profile_, items_, localized_strings));
302 } 302 }
OLDNEW
« no previous file with comments | « chrome/browser/history/delete_directive_handler.cc ('k') | chrome/browser/media/media_stream_capture_indicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698