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

Side by Side Diff: extensions/browser/api/document_scan/document_scan_interface_chromeos_unittest.cc

Issue 1902873002: Convert //extensions/browser/api 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 "extensions/browser/api/document_scan/document_scan_interface_chromeos. h" 5 #include "extensions/browser/api/document_scan/document_scan_interface_chromeos. h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 23 matching lines...) Expand all
34 DocumentScanInterface::ScannerDescription>& scanners, 34 DocumentScanInterface::ScannerDescription>& scanners,
35 const std::string& error)); 35 const std::string& error));
36 36
37 MOCK_METHOD3(OnScanCompleted, 37 MOCK_METHOD3(OnScanCompleted,
38 void(const std::string& scanned_image, 38 void(const std::string& scanned_image,
39 const std::string& mime_type, 39 const std::string& mime_type,
40 const std::string& error)); 40 const std::string& error));
41 41
42 protected: 42 protected:
43 DocumentScanInterfaceChromeos scan_interface_; 43 DocumentScanInterfaceChromeos scan_interface_;
44 scoped_ptr<chromeos::MockLorgnetteManagerClient> client_; 44 std::unique_ptr<chromeos::MockLorgnetteManagerClient> client_;
45 }; 45 };
46 46
47 ACTION_P2(InvokeListScannersCallback, scanner_list, error) { 47 ACTION_P2(InvokeListScannersCallback, scanner_list, error) {
48 ::std::tr1::get<0>(args).Run(scanner_list, error); 48 ::std::tr1::get<0>(args).Run(scanner_list, error);
49 } 49 }
50 50
51 ACTION_P2(InvokeScanCallback, succeeded, image_data) { 51 ACTION_P2(InvokeScanCallback, succeeded, image_data) {
52 ::std::tr1::get<2>(args).Run(succeeded, image_data); 52 ::std::tr1::get<2>(args).Run(succeeded, image_data);
53 } 53 }
54 54
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 EXPECT_CALL(*this, OnScanCompleted(kExpectedImageData, "image/png", "")); 118 EXPECT_CALL(*this, OnScanCompleted(kExpectedImageData, "image/png", ""));
119 scan_interface_.Scan( 119 scan_interface_.Scan(
120 kScannerName, DocumentScanInterface::kScanModeColor, kResolution, 120 kScannerName, DocumentScanInterface::kScanModeColor, kResolution,
121 base::Bind(&DocumentScanInterfaceChromeosTest::OnScanCompleted, 121 base::Bind(&DocumentScanInterfaceChromeosTest::OnScanCompleted,
122 base::Unretained(this))); 122 base::Unretained(this)));
123 } 123 }
124 124
125 } // namespace api 125 } // namespace api
126 126
127 } // namespace extensions 127 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/document_scan/document_scan_interface.h ('k') | extensions/browser/api/execute_code_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698