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

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

Issue 203993004: support loading pepper flash debugger dlls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undoing git cl format changes Created 6 years, 7 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
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/file_util.h" 7 #include "base/file_util.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
(...skipping 26 matching lines...) Expand all
37 #elif defined(OS_WIN) 37 #elif defined(OS_WIN)
38 FILE_PATH_LITERAL("gcswf32.dll"); 38 FILE_PATH_LITERAL("gcswf32.dll");
39 #else // OS_LINUX, etc. 39 #else // OS_LINUX, etc.
40 FILE_PATH_LITERAL("libgcflashplayer.so"); 40 FILE_PATH_LITERAL("libgcflashplayer.so");
41 #endif 41 #endif
42 42
43 // The Pepper Flash plugins are in a directory with this name. 43 // The Pepper Flash plugins are in a directory with this name.
44 const base::FilePath::CharType kPepperFlashBaseDirectory[] = 44 const base::FilePath::CharType kPepperFlashBaseDirectory[] =
45 FILE_PATH_LITERAL("PepperFlash"); 45 FILE_PATH_LITERAL("PepperFlash");
46 46
47 #if defined(OS_WIN)
48 const base::FilePath::CharType kPepperFlashDebuggerBaseDirectory[] =
49 FILE_PATH_LITERAL("Macromed\\Flash");
50 #endif
51
47 // File name of the internal PDF plugin on different platforms. 52 // File name of the internal PDF plugin on different platforms.
48 const base::FilePath::CharType kInternalPDFPluginFileName[] = 53 const base::FilePath::CharType kInternalPDFPluginFileName[] =
49 #if defined(OS_WIN) 54 #if defined(OS_WIN)
50 FILE_PATH_LITERAL("pdf.dll"); 55 FILE_PATH_LITERAL("pdf.dll");
51 #elif defined(OS_MACOSX) 56 #elif defined(OS_MACOSX)
52 FILE_PATH_LITERAL("PDF.plugin"); 57 FILE_PATH_LITERAL("PDF.plugin");
53 #else // Linux and Chrome OS 58 #else // Linux and Chrome OS
54 FILE_PATH_LITERAL("libpdf.so"); 59 FILE_PATH_LITERAL("libpdf.so");
55 #endif 60 #endif
56 61
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 case chrome::DIR_PEPPER_FLASH_PLUGIN: 261 case chrome::DIR_PEPPER_FLASH_PLUGIN:
257 if (!GetInternalPluginsDirectory(&cur)) 262 if (!GetInternalPluginsDirectory(&cur))
258 return false; 263 return false;
259 cur = cur.Append(kPepperFlashBaseDirectory); 264 cur = cur.Append(kPepperFlashBaseDirectory);
260 break; 265 break;
261 case chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN: 266 case chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN:
262 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 267 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
263 return false; 268 return false;
264 cur = cur.Append(kPepperFlashBaseDirectory); 269 cur = cur.Append(kPepperFlashBaseDirectory);
265 break; 270 break;
271 case chrome::DIR_PEPPER_FLASH_DEBUGGER_PLUGIN:
272 #if defined(OS_WIN)
273 if (!PathService::Get(base::DIR_SYSTEM, &cur))
274 return false;
275 cur = cur.Append(kPepperFlashDebuggerBaseDirectory);
276 #elif defined(OS_MACOSX)
277 // TODO(luken): finalize Mac OS directory paths, current consensus is
278 // around /Library/Internet Plug-Ins/PepperFlashPlayer/
279 return false;
280 #else
281 return false;
282 #endif
283 break;
266 case chrome::FILE_LOCAL_STATE: 284 case chrome::FILE_LOCAL_STATE:
267 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 285 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
268 return false; 286 return false;
269 cur = cur.Append(chrome::kLocalStateFilename); 287 cur = cur.Append(chrome::kLocalStateFilename);
270 break; 288 break;
271 case chrome::FILE_RECORDED_SCRIPT: 289 case chrome::FILE_RECORDED_SCRIPT:
272 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 290 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
273 return false; 291 return false;
274 cur = cur.Append(FILE_PATH_LITERAL("script.log")); 292 cur = cur.Append(FILE_PATH_LITERAL("script.log"));
275 break; 293 break;
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 589
572 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { 590 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) {
573 g_invalid_specified_user_data_dir.Get() = user_data_dir; 591 g_invalid_specified_user_data_dir.Get() = user_data_dir;
574 } 592 }
575 593
576 const base::FilePath& GetInvalidSpecifiedUserDataDir() { 594 const base::FilePath& GetInvalidSpecifiedUserDataDir() {
577 return g_invalid_specified_user_data_dir.Get(); 595 return g_invalid_specified_user_data_dir.Get();
578 } 596 }
579 597
580 } // namespace chrome 598 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698