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

Side by Side Diff: base/base_paths_win.cc

Issue 8585029: Make GetWebKitRootDirFilePath smarter about where the WebKit root is relative to the chromium root (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « base/base_paths_posix.cc ('k') | webkit/support/webkit_support.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 "base/base_paths_win.h" 5 #include "base/base_paths_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 SHGFP_TYPE_CURRENT, system_buffer))) 110 SHGFP_TYPE_CURRENT, system_buffer)))
111 return false; 111 return false;
112 cur = FilePath(system_buffer); 112 cur = FilePath(system_buffer);
113 break; 113 break;
114 case base::DIR_SOURCE_ROOT: { 114 case base::DIR_SOURCE_ROOT: {
115 FilePath executableDir; 115 FilePath executableDir;
116 // On Windows, unit tests execute two levels deep from the source root. 116 // On Windows, unit tests execute two levels deep from the source root.
117 // For example: chrome/{Debug|Release}/ui_tests.exe 117 // For example: chrome/{Debug|Release}/ui_tests.exe
118 PathService::Get(base::DIR_EXE, &executableDir); 118 PathService::Get(base::DIR_EXE, &executableDir);
119 cur = executableDir.DirName().DirName(); 119 cur = executableDir.DirName().DirName();
120 FilePath checkedPath =
121 cur.Append(FILE_PATH_LITERAL("base/base_paths_win.cc"));
122 if (!file_util::PathExists(checkedPath)) {
123 // Check for WebKit-only checkout. Executable files are put into
124 // WebKit/WebKit/chromium/{Debug|Relese}, and we should return
125 // WebKit/WebKit/chromium.
126 cur = executableDir.DirName();
127 }
128 break; 120 break;
129 } 121 }
130 default: 122 default:
131 return false; 123 return false;
132 } 124 }
133 125
134 *result = cur; 126 *result = cur;
135 return true; 127 return true;
136 } 128 }
137 129
138 } // namespace base 130 } // namespace base
OLDNEW
« no previous file with comments | « base/base_paths_posix.cc ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698