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

Side by Side Diff: chrome/common/chrome_paths.cc

Issue 1462001: Use internal pdf plugin with --internal-pdf (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/chrome_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) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 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 "chrome/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 #endif 214 #endif
215 } 215 }
216 break; 216 break;
217 case chrome::FILE_FLASH_PLUGIN: 217 case chrome::FILE_FLASH_PLUGIN:
218 if (!GetInternalPluginsDirectory(&cur)) 218 if (!GetInternalPluginsDirectory(&cur))
219 return false; 219 return false;
220 cur = cur.Append(kInternalFlashPluginFileName); 220 cur = cur.Append(kInternalFlashPluginFileName);
221 if (!file_util::PathExists(cur)) 221 if (!file_util::PathExists(cur))
222 return false; 222 return false;
223 break; 223 break;
224 case chrome::FILE_PDF_PLUGIN:
225 if (!PathService::Get(base::DIR_MODULE, &cur))
226 return false;
227 #if defined(OS_WIN)
228 cur = cur.Append(FILE_PATH_LITERAL("pdf.dll"));
229 if (!file_util::PathExists(cur))
230 return false;
231 #else
232 // TODO: port
233 return false;
234 #endif
235 break;
224 #if defined(OS_CHROMEOS) 236 #if defined(OS_CHROMEOS)
225 case chrome::FILE_CHROMEOS_API: 237 case chrome::FILE_CHROMEOS_API:
226 if (!PathService::Get(base::DIR_MODULE, &cur)) 238 if (!PathService::Get(base::DIR_MODULE, &cur))
227 return false; 239 return false;
228 cur = cur.Append(FILE_PATH_LITERAL("chromeos")); 240 cur = cur.Append(FILE_PATH_LITERAL("chromeos"));
229 cur = cur.Append(FILE_PATH_LITERAL("libcros.so")); 241 cur = cur.Append(FILE_PATH_LITERAL("libcros.so"));
230 break; 242 break;
231 #endif 243 #endif
232 // The following are only valid in the development environment, and 244 // The following are only valid in the development environment, and
233 // will fail if executed from an installed executable (because the 245 // will fail if executed from an installed executable (because the
(...skipping 28 matching lines...) Expand all
262 return true; 274 return true;
263 } 275 }
264 276
265 // This cannot be done as a static initializer sadly since Visual Studio will 277 // This cannot be done as a static initializer sadly since Visual Studio will
266 // eliminate this object file if there is no direct entry point into it. 278 // eliminate this object file if there is no direct entry point into it.
267 void RegisterPathProvider() { 279 void RegisterPathProvider() {
268 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 280 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
269 } 281 }
270 282
271 } // namespace chrome 283 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698