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

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

Issue 93263002: Move some more file utils to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
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/plugin_list.h" 5 #include "content/common/plugin_list.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <dlfcn.h> 8 #include <dlfcn.h>
9 #if defined(OS_OPENBSD) 9 #if defined(OS_OPENBSD)
10 #include <sys/exec_elf.h> 10 #include <sys/exec_elf.h>
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 if (moz_plugin_path) { 457 if (moz_plugin_path) {
458 std::vector<std::string> paths; 458 std::vector<std::string> paths;
459 base::SplitString(moz_plugin_path, ':', &paths); 459 base::SplitString(moz_plugin_path, ':', &paths);
460 for (size_t i = 0; i < paths.size(); ++i) 460 for (size_t i = 0; i < paths.size(); ++i)
461 plugin_dirs->push_back(base::FilePath(paths[i])); 461 plugin_dirs->push_back(base::FilePath(paths[i]));
462 } 462 }
463 463
464 // 2) NS_USER_PLUGINS_DIR: ~/.mozilla/plugins. 464 // 2) NS_USER_PLUGINS_DIR: ~/.mozilla/plugins.
465 // This is a de-facto standard, so even though we're not Mozilla, let's 465 // This is a de-facto standard, so even though we're not Mozilla, let's
466 // look in there too. 466 // look in there too.
467 base::FilePath home = file_util::GetHomeDir(); 467 base::FilePath home = base::GetHomeDir();
468 if (!home.empty()) 468 if (!home.empty())
469 plugin_dirs->push_back(home.Append(".mozilla/plugins")); 469 plugin_dirs->push_back(home.Append(".mozilla/plugins"));
470 470
471 // 3) NS_SYSTEM_PLUGINS_DIR: 471 // 3) NS_SYSTEM_PLUGINS_DIR:
472 // This varies across different browsers and versions, so check 'em all. 472 // This varies across different browsers and versions, so check 'em all.
473 plugin_dirs->push_back(base::FilePath("/usr/lib/browser-plugins")); 473 plugin_dirs->push_back(base::FilePath("/usr/lib/browser-plugins"));
474 plugin_dirs->push_back(base::FilePath("/usr/lib/mozilla/plugins")); 474 plugin_dirs->push_back(base::FilePath("/usr/lib/mozilla/plugins"));
475 plugin_dirs->push_back(base::FilePath("/usr/lib/firefox/plugins")); 475 plugin_dirs->push_back(base::FilePath("/usr/lib/firefox/plugins"));
476 plugin_dirs->push_back(base::FilePath("/usr/lib/xulrunner-addons/plugins")); 476 plugin_dirs->push_back(base::FilePath("/usr/lib/xulrunner-addons/plugins"));
477 477
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 } 584 }
585 585
586 // TODO(evanm): prefer the newest version of flash, etc. here? 586 // TODO(evanm): prefer the newest version of flash, etc. here?
587 587
588 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); 588 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value();
589 589
590 return true; 590 return true;
591 } 591 }
592 592
593 } // namespace content 593 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/dom_storage/session_storage_database.cc ('k') | content/shell/browser/shell_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698