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

Side by Side Diff: content/common/content_paths.cc

Issue 7669040: content: Move render_widget_host_view_gtk to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos fix. Created 9 years, 4 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 | « content/common/content_paths.h ('k') | content/common/content_switches.h » ('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/common/content_paths.h" 5 #include "content/common/content_paths.h"
6 6
7 #include "base/file_util.h"
7 #include "base/path_service.h" 8 #include "base/path_service.h"
8 9
9 namespace content { 10 namespace content {
10 11
11 bool PathProvider(int key, FilePath* result) { 12 bool PathProvider(int key, FilePath* result) {
12 switch (key) { 13 switch (key) {
13 case CHILD_PROCESS_EXE: 14 case CHILD_PROCESS_EXE:
14 return PathService::Get(base::FILE_EXE, result); 15 return PathService::Get(base::FILE_EXE, result);
16 case DIR_TEST_DATA: {
17 FilePath cur;
18 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
19 return false;
20 cur = cur.Append(FILE_PATH_LITERAL("content"));
21 cur = cur.Append(FILE_PATH_LITERAL("test"));
22 cur = cur.Append(FILE_PATH_LITERAL("data"));
23 if (!file_util::PathExists(cur)) // we don't want to create this
24 return false;
25
26 *result = cur;
27 return true;
28 break;
29 }
15 default: 30 default:
16 break; 31 return false;
17 } 32 }
18 33
19 return false; 34 return false;
20 } 35 }
21 36
22 // This cannot be done as a static initializer sadly since Visual Studio will 37 // This cannot be done as a static initializer sadly since Visual Studio will
23 // eliminate this object file if there is no direct entry point into it. 38 // eliminate this object file if there is no direct entry point into it.
24 void RegisterPathProvider() { 39 void RegisterPathProvider() {
25 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 40 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
26 } 41 }
27 42
28 } // namespace content 43 } // namespace content
OLDNEW
« no previous file with comments | « content/common/content_paths.h ('k') | content/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698