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

Side by Side Diff: webkit/glue/plugins/plugin_list_posix.cc

Issue 2716002: Add a command line switch to enable the pepper testing interface. This moves ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "webkit/glue/plugins/plugin_list.h" 5 #include "webkit/glue/plugins/plugin_list.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/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "webkit/glue/plugins/plugin_switches.h"
12 13
13 namespace { 14 namespace {
14 15
15 // Return true if we're in debug-plugin-loading mode. 16 // Return true if we're in debug-plugin-loading mode.
16 bool DebugPluginLoading() { 17 bool DebugPluginLoading() {
17 static const char kDebugPluginLoading[] = "debug-plugin-loading"; 18 return CommandLine::ForCurrentProcess()->HasSwitch(
18 return CommandLine::ForCurrentProcess()->HasSwitch(kDebugPluginLoading); 19 switches::kDebugPluginLoading);
19 } 20 }
20 21
21 // Shorthand way of logging plugin load status. 22 // Shorthand way of logging plugin load status.
22 #define PLUG_LOG if (DebugPluginLoading()) LOG(INFO) 23 #define PLUG_LOG if (DebugPluginLoading()) LOG(INFO)
23 24
24 // We build up a list of files and mtimes so we can sort them. 25 // We build up a list of files and mtimes so we can sort them.
25 typedef std::pair<FilePath, base::Time> FileAndTime; 26 typedef std::pair<FilePath, base::Time> FileAndTime;
26 typedef std::vector<FileAndTime> FileTimeList; 27 typedef std::vector<FileAndTime> FileTimeList;
27 28
28 // Comparator used to sort by descending mtime then ascending filename. 29 // Comparator used to sort by descending mtime then ascending filename.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 227 }
227 228
228 // TODO(evanm): prefer the newest version of flash, etc. here? 229 // TODO(evanm): prefer the newest version of flash, etc. here?
229 230
230 PLUG_LOG << "Using " << info.path.value(); 231 PLUG_LOG << "Using " << info.path.value();
231 232
232 return true; 233 return true;
233 } 234 }
234 235
235 } // namespace NPAPI 236 } // namespace NPAPI
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698