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

Side by Side Diff: chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.cc

Issue 2825963003: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/extensions (Closed)
Patch Set: Created 3 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 <string.h> 5 #include <string.h>
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "chrome/browser/extensions/api/image_writer_private/destroy_partitions_ operation.h" 8 #include "chrome/browser/extensions/api/image_writer_private/destroy_partitions_ operation.h"
9 #include "chrome/browser/extensions/api/image_writer_private/error_messages.h" 9 #include "chrome/browser/extensions/api/image_writer_private/error_messages.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 24 matching lines...) Expand all
35 std::unique_ptr<char[]> buffer(new char[kPartitionTableSize]); 35 std::unique_ptr<char[]> buffer(new char[kPartitionTableSize]);
36 memset(buffer.get(), 0, kPartitionTableSize); 36 memset(buffer.get(), 0, kPartitionTableSize);
37 37
38 if (base::WriteFile(image_path_, buffer.get(), kPartitionTableSize) != 38 if (base::WriteFile(image_path_, buffer.get(), kPartitionTableSize) !=
39 kPartitionTableSize) { 39 kPartitionTableSize) {
40 Error(error::kTempFileError); 40 Error(error::kTempFileError);
41 return; 41 return;
42 } 42 }
43 43
44 content::BrowserThread::PostTask( 44 content::BrowserThread::PostTask(
45 content::BrowserThread::FILE, 45 content::BrowserThread::FILE, FROM_HERE,
46 FROM_HERE, 46 base::BindOnce(&DestroyPartitionsOperation::Write, this,
47 base::Bind(&DestroyPartitionsOperation::Write, 47 base::Bind(&DestroyPartitionsOperation::Finish, this)));
48 this,
49 base::Bind(&DestroyPartitionsOperation::Finish, this)));
50 } 48 }
51 49
52 } // namespace image_writer 50 } // namespace image_writer
53 } // namespace extensions 51 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698