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

Side by Side Diff: content/test/plugin/plugin_geturl_test.cc

Issue 689063002: Cleanup: Replace base::ASCIIToWide with base::ASCIIToUTF16. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix typo Created 6 years, 1 month 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 | « content/browser/download/save_package_unittest.cc ('k') | ipc/ipc_channel_win.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/test/plugin/plugin_geturl_test.h" 5 #include "content/test/plugin/plugin_geturl_test.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 break; 199 break;
200 } 200 }
201 201
202 // TODO(evanm): use the net:: functions to convert file:// URLs to 202 // TODO(evanm): use the net:: functions to convert file:// URLs to
203 // on-disk file paths. But it probably doesn't actually matter in 203 // on-disk file paths. But it probably doesn't actually matter in
204 // this test. 204 // this test.
205 205
206 #if defined(OS_WIN) 206 #if defined(OS_WIN)
207 filename = filename.substr(8); // remove "file:///" 207 filename = filename.substr(8); // remove "file:///"
208 // Assume an ASCII path on Windows. 208 // Assume an ASCII path on Windows.
209 base::FilePath path = base::FilePath(base::ASCIIToWide(filename)); 209 base::FilePath path = base::FilePath(base::ASCIIToUTF16(filename));
210 #else 210 #else
211 filename = filename.substr(7); // remove "file://" 211 filename = filename.substr(7); // remove "file://"
212 base::FilePath path = base::FilePath(filename); 212 base::FilePath path = base::FilePath(filename);
213 #endif 213 #endif
214 214
215 test_file_ = base::OpenFile(path, "r"); 215 test_file_ = base::OpenFile(path, "r");
216 if (!test_file_) { 216 if (!test_file_) {
217 SetError("Could not open source file"); 217 SetError("Could not open source file");
218 } 218 }
219 } 219 }
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 id(), REDIRECT_SRC_URL, NULL, 468 id(), REDIRECT_SRC_URL, NULL,
469 reinterpret_cast<void*>(REDIRECT_SRC_URL_NOTIFICATION_ALLOW_ID)); 469 reinterpret_cast<void*>(REDIRECT_SRC_URL_NOTIFICATION_ALLOW_ID));
470 } 470 }
471 } else if (stream_id == REDIRECT_SRC_URL_NOTIFICATION_ALLOW_ID) { 471 } else if (stream_id == REDIRECT_SRC_URL_NOTIFICATION_ALLOW_ID) {
472 received_url_redirect_allow_notification_ = true; 472 received_url_redirect_allow_notification_ = true;
473 HostFunctions()->urlredirectresponse(id(), notify_data, true); 473 HostFunctions()->urlredirectresponse(id(), notify_data, true);
474 } 474 }
475 } 475 }
476 476
477 } // namespace NPAPIClient 477 } // namespace NPAPIClient
OLDNEW
« no previous file with comments | « content/browser/download/save_package_unittest.cc ('k') | ipc/ipc_channel_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698