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

Side by Side Diff: chrome/utility/image_writer/disk_unmounter_mac.cc

Issue 1899083002: Convert //chrome from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/image_writer/disk_unmounter_mac.h" 5 #include "chrome/utility/image_writer/disk_unmounter_mac.h"
6 6
7 #include <sys/socket.h> 7 #include <sys/socket.h>
8 #include <IOKit/storage/IOStorageProtocolCharacteristics.h> 8 #include <IOKit/storage/IOStorageProtocolCharacteristics.h>
9 9
10 #include "base/message_loop/message_pump_mac.h" 10 #include "base/message_loop/message_pump_mac.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 LOG(ERROR) << "Unable to unmount disk."; 82 LOG(ERROR) << "Unable to unmount disk.";
83 disk_unmounter->Error(); 83 disk_unmounter->Error();
84 return; 84 return;
85 } 85 }
86 86
87 disk_unmounter->original_thread_->PostTask( 87 disk_unmounter->original_thread_->PostTask(
88 FROM_HERE, disk_unmounter->success_continuation_); 88 FROM_HERE, disk_unmounter->success_continuation_);
89 } 89 }
90 90
91 // static 91 // static
92 scoped_ptr<base::MessagePump> DiskUnmounterMac::CreateMessagePump() { 92 std::unique_ptr<base::MessagePump> DiskUnmounterMac::CreateMessagePump() {
93 return scoped_ptr<base::MessagePump>(new base::MessagePumpCFRunLoop); 93 return std::unique_ptr<base::MessagePump>(new base::MessagePumpCFRunLoop);
94 } 94 }
95 95
96 void DiskUnmounterMac::UnmountOnWorker(const std::string& device_path) { 96 void DiskUnmounterMac::UnmountOnWorker(const std::string& device_path) {
97 DCHECK(cf_thread_.message_loop() == base::MessageLoop::current()); 97 DCHECK(cf_thread_.message_loop() == base::MessageLoop::current());
98 98
99 session_.reset(DASessionCreate(NULL)); 99 session_.reset(DASessionCreate(NULL));
100 100
101 DASessionScheduleWithRunLoop( 101 DASessionScheduleWithRunLoop(
102 session_, CFRunLoopGetCurrent(), kCFRunLoopCommonModes); 102 session_, CFRunLoopGetCurrent(), kCFRunLoopCommonModes);
103 103
(...skipping 12 matching lines...) Expand all
116 this, 116 this,
117 DiskClaimed, 117 DiskClaimed,
118 this); 118 this);
119 } 119 }
120 120
121 void DiskUnmounterMac::Error() { 121 void DiskUnmounterMac::Error() {
122 original_thread_->PostTask(FROM_HERE, failure_continuation_); 122 original_thread_->PostTask(FROM_HERE, failure_continuation_);
123 } 123 }
124 124
125 } // namespace image_writer 125 } // namespace image_writer
OLDNEW
« no previous file with comments | « chrome/utility/image_writer/disk_unmounter_mac.h ('k') | chrome/utility/image_writer/image_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698