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

Side by Side Diff: webkit/plugins/ppapi/plugin_module.cc

Issue 10702188: Fix unit test to allow repeated successful runs by avoiding a function static variable in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add DEPS file Created 8 years, 5 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 | « ppapi/shared_impl/ppapi_globals.cc ('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 "webkit/plugins/ppapi/plugin_module.h" 5 #include "webkit/plugins/ppapi/plugin_module.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 path_(path), 419 path_(path),
420 permissions_(perms), 420 permissions_(perms),
421 reserve_instance_id_(NULL), 421 reserve_instance_id_(NULL),
422 nacl_ipc_proxy_(false) { 422 nacl_ipc_proxy_(false) {
423 // Ensure the globals object is created. 423 // Ensure the globals object is created.
424 if (!host_globals) 424 if (!host_globals)
425 host_globals = new HostGlobals; 425 host_globals = new HostGlobals;
426 426
427 memset(&entry_points_, 0, sizeof(entry_points_)); 427 memset(&entry_points_, 0, sizeof(entry_points_));
428 pp_module_ = HostGlobals::Get()->AddModule(this); 428 pp_module_ = HostGlobals::Get()->AddModule(this);
429 // Initialize the main thread message loop.
430 PpapiGlobals::Get()->GetMainThreadMessageLoop();
431 GetLivePluginSet()->insert(this); 429 GetLivePluginSet()->insert(this);
432 } 430 }
433 431
434 PluginModule::~PluginModule() { 432 PluginModule::~PluginModule() {
435 // In the past there have been crashes reentering the plugin module 433 // In the past there have been crashes reentering the plugin module
436 // destructor. Catch if that happens again earlier. 434 // destructor. Catch if that happens again earlier.
437 CHECK(!is_in_destructor_); 435 CHECK(!is_in_destructor_);
438 is_in_destructor_ = true; 436 is_in_destructor_ = true;
439 437
440 // When the module is being deleted, there should be no more instances still 438 // When the module is being deleted, there should be no more instances still
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 int retval = entry_points.initialize_module(pp_module(), &GetInterface); 614 int retval = entry_points.initialize_module(pp_module(), &GetInterface);
617 if (retval != 0) { 615 if (retval != 0) {
618 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 616 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
619 return false; 617 return false;
620 } 618 }
621 return true; 619 return true;
622 } 620 }
623 621
624 } // namespace ppapi 622 } // namespace ppapi
625 } // namespace webkit 623 } // namespace webkit
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppapi_globals.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698