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

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

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 years, 11 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.cc ('k') | chrome/common/chrome_plugin_util.cc » ('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-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_plugin_lib.h" 5 #include "chrome/common/chrome_plugin_lib.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/hash_tables.h" 8 #include "base/hash_tables.h"
9 #include "base/histogram.h" 9 #include "base/histogram.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 26 matching lines...) Expand all
37 static MessageLoop* g_plugin_thread_loop = NULL; 37 static MessageLoop* g_plugin_thread_loop = NULL;
38 38
39 #ifdef GEARS_STATIC_LIB 39 #ifdef GEARS_STATIC_LIB
40 // defined in gears/base/chrome/module_cr.cc 40 // defined in gears/base/chrome/module_cr.cc
41 CPError STDCALL Gears_CP_Initialize(CPID id, const CPBrowserFuncs *bfuncs, 41 CPError STDCALL Gears_CP_Initialize(CPID id, const CPBrowserFuncs *bfuncs,
42 CPPluginFuncs *pfuncs); 42 CPPluginFuncs *pfuncs);
43 #endif 43 #endif
44 44
45 static bool IsSingleProcessMode() { 45 static bool IsSingleProcessMode() {
46 // We don't support ChromePlugins in single-process mode. 46 // We don't support ChromePlugins in single-process mode.
47 CommandLine command_line; 47 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
48 return command_line.HasSwitch(switches::kSingleProcess);
49 } 48 }
50 49
51 // static 50 // static
52 bool ChromePluginLib::IsInitialized() { 51 bool ChromePluginLib::IsInitialized() {
53 return (g_loaded_libs != NULL); 52 return (g_loaded_libs != NULL);
54 } 53 }
55 54
56 // static 55 // static
57 ChromePluginLib* ChromePluginLib::Create(const FilePath& filename, 56 ChromePluginLib* ChromePluginLib::Create(const FilePath& filename,
58 const CPBrowserFuncs* bfuncs) { 57 const CPBrowserFuncs* bfuncs) {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 NotificationService::NoDetails()); 276 NotificationService::NoDetails());
278 277
279 if (initialized_) 278 if (initialized_)
280 CP_Shutdown(); 279 CP_Shutdown();
281 280
282 if (module_) { 281 if (module_) {
283 FreeLibrary(module_); 282 FreeLibrary(module_);
284 module_ = 0; 283 module_ = 0;
285 } 284 }
286 } 285 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | chrome/common/chrome_plugin_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698