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

Side by Side Diff: chrome/browser/browser_encoding_browsertest.cc

Issue 2825003002: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/{a,b,c,d,e,f,g}* (Closed)
Patch Set: split rest of changes to 3 CLs 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
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/browser_process_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 ", expected_file = " << expected_file_name.AsUTF8Unsafe(); 140 ", expected_file = " << expected_file_name.AsUTF8Unsafe();
141 } 141 }
142 142
143 void SetUpOnMainThread() override { 143 void SetUpOnMainThread() override {
144 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 144 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
145 save_dir_ = temp_dir_.GetPath(); 145 save_dir_ = temp_dir_.GetPath();
146 temp_sub_resource_dir_ = save_dir_.AppendASCII("sub_resource_files"); 146 temp_sub_resource_dir_ = save_dir_.AppendASCII("sub_resource_files");
147 147
148 BrowserThread::PostTask( 148 BrowserThread::PostTask(
149 BrowserThread::IO, FROM_HERE, 149 BrowserThread::IO, FROM_HERE,
150 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); 150 base::BindOnce(&chrome_browser_net::SetUrlRequestMocksEnabled, true));
151 } 151 }
152 152
153 base::ScopedTempDir temp_dir_; 153 base::ScopedTempDir temp_dir_;
154 base::FilePath save_dir_; 154 base::FilePath save_dir_;
155 base::FilePath temp_sub_resource_dir_; 155 base::FilePath temp_sub_resource_dir_;
156 }; 156 };
157 157
158 // TODO(jnd): 1. Some encodings are missing here. It'll be added later. See 158 // TODO(jnd): 1. Some encodings are missing here. It'll be added later. See
159 // http://crbug.com/13306. 159 // http://crbug.com/13306.
160 // 2. Add more files with multiple encoding name variants for each canonical 160 // 2. Add more files with multiple encoding name variants for each canonical
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 // Dump the page, the content of dump page should be equal with our expect 271 // Dump the page, the content of dump page should be equal with our expect
272 // result file. 272 // result file.
273 base::FilePath expected_result_file_name = 273 base::FilePath expected_result_file_name =
274 base::FilePath().AppendASCII(kAutoDetectDir). 274 base::FilePath().AppendASCII(kAutoDetectDir).
275 AppendASCII(kExpectedResultDir). 275 AppendASCII(kExpectedResultDir).
276 AppendASCII(kTestDatas[i].expected_result); 276 AppendASCII(kTestDatas[i].expected_result);
277 SaveAndCompare(kTestDatas[i].test_file_name, expected_result_file_name); 277 SaveAndCompare(kTestDatas[i].test_file_name, expected_result_file_name);
278 } 278 }
279 } 279 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/browser_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698