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

Side by Side Diff: chrome/utility/profile_import_handler.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/utility/profile_import_handler.h" 5 #include "chrome/utility/profile_import_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 void ProfileImportHandler::OnImportCancel() { 63 void ProfileImportHandler::OnImportCancel() {
64 ImporterCleanup(); 64 ImporterCleanup();
65 } 65 }
66 66
67 void ProfileImportHandler::OnImportItemFinished(uint16 item) { 67 void ProfileImportHandler::OnImportItemFinished(uint16 item) {
68 items_to_import_ ^= item; // Remove finished item from mask. 68 items_to_import_ ^= item; // Remove finished item from mask.
69 // If we've finished with all items, notify the browser process. 69 // If we've finished with all items, notify the browser process.
70 if (items_to_import_ == 0) { 70 if (items_to_import_ == 0) {
71 Send(new ProfileImportProcessHostMsg_Import_Finished(true, "")); 71 Send(new ProfileImportProcessHostMsg_Import_Finished(true, std::string()));
72 ImporterCleanup(); 72 ImporterCleanup();
73 } 73 }
74 } 74 }
75 75
76 void ProfileImportHandler::ImporterCleanup() { 76 void ProfileImportHandler::ImporterCleanup() {
77 importer_->Cancel(); 77 importer_->Cancel();
78 importer_ = NULL; 78 importer_ = NULL;
79 bridge_ = NULL; 79 bridge_ = NULL;
80 import_thread_.reset(); 80 import_thread_.reset();
81 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); 81 content::UtilityThread::Get()->ReleaseProcessIfNeeded();
82 } 82 }
83 83
84 // static 84 // static
85 bool ProfileImportHandler::Send(IPC::Message* message) { 85 bool ProfileImportHandler::Send(IPC::Message* message) {
86 return content::UtilityThread::Get()->Send(message); 86 return content::UtilityThread::Get()->Send(message);
87 } 87 }
88 88
89 } // namespace chrome 89 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/tools/ipclist/ipcfuzz.cc ('k') | components/autofill/browser/phone_number_i18n_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698