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

Unified Diff: webkit/tools/test_shell/test_shell.cc

Issue 99266: Deprecate wstring version of PathService::Get() in webkit. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/node_leak_test.cc ('k') | webkit/tools/test_shell/test_shell_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell.cc
===================================================================
--- webkit/tools/test_shell/test_shell.cc (revision 15017)
+++ webkit/tools/test_shell/test_shell.cc (working copy)
@@ -66,13 +66,12 @@
static URLRequestJob* InspectorFactory(URLRequest* request,
const std::string& scheme) {
- std::wstring path;
+ FilePath path;
PathService::Get(base::DIR_EXE, &path);
- file_util::AppendToPath(&path, L"resources");
- file_util::AppendToPath(&path, L"inspector");
- file_util::AppendToPath(&path, UTF8ToWide(request->url().path()));
- return new URLRequestTestShellFileJob(request,
- FilePath::FromWStringHack(path));
+ path = path.AppendASCII("resources");
+ path = path.AppendASCII("inspector");
+ path = path.AppendASCII(request->url().path());
+ return new URLRequestTestShellFileJob(request, path);
}
private:
@@ -583,7 +582,11 @@
}
bool GetApplicationDirectory(std::wstring *path) {
- return PathService::Get(base::DIR_EXE, path);
+ bool r;
+ FilePath fp;
+ r = PathService::Get(base::DIR_EXE, &fp);
+ *path = fp.ToWStringHack();
+ return r;
}
GURL GetInspectorURL() {
@@ -595,7 +598,7 @@
}
bool GetExeDirectory(std::wstring *path) {
- return PathService::Get(base::DIR_EXE, path);
+ return GetApplicationDirectory(path);
}
bool SpellCheckWord(const wchar_t* word, int word_len,
« no previous file with comments | « webkit/tools/test_shell/node_leak_test.cc ('k') | webkit/tools/test_shell/test_shell_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698