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

Side by Side Diff: content/browser/plugin_loader_posix.h

Issue 9235052: Fix race condition in utility process clients (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to ToT Created 8 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 | 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 #ifndef CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_ 5 #ifndef CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_
6 #define CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_ 6 #define CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // Checks if the plugin path is an internal plugin, and, if it is, adds it to 85 // Checks if the plugin path is an internal plugin, and, if it is, adds it to
86 // |loaded_plugins_|. 86 // |loaded_plugins_|.
87 bool MaybeAddInternalPlugin(const FilePath& plugin_path); 87 bool MaybeAddInternalPlugin(const FilePath& plugin_path);
88 88
89 // Runs all the registered callbacks on each's target loop if the condition 89 // Runs all the registered callbacks on each's target loop if the condition
90 // for ending the load process is done (i.e. the |next_load_index_| is outside 90 // for ending the load process is done (i.e. the |next_load_index_| is outside
91 // the range of the |canonical_list_|). 91 // the range of the |canonical_list_|).
92 bool MaybeRunPendingCallbacks(); 92 bool MaybeRunPendingCallbacks();
93 93
94 // The process host for which this is a client. 94 // The process host for which this is a client.
95 UtilityProcessHost* process_host_; 95 base::WeakPtr<UtilityProcessHost> process_host_;
96 96
97 // A list of paths to plugins which will be loaded by the utility process, in 97 // A list of paths to plugins which will be loaded by the utility process, in
98 // the order specified by this vector. 98 // the order specified by this vector.
99 std::vector<FilePath> canonical_list_; 99 std::vector<FilePath> canonical_list_;
100 100
101 // The index in |canonical_list_| of the plugin that the child process will 101 // The index in |canonical_list_| of the plugin that the child process will
102 // attempt to load next. 102 // attempt to load next.
103 size_t next_load_index_; 103 size_t next_load_index_;
104 104
105 // Internal plugins that have been registered at the time of loading. 105 // Internal plugins that have been registered at the time of loading.
106 std::vector<webkit::WebPluginInfo> internal_plugins_; 106 std::vector<webkit::WebPluginInfo> internal_plugins_;
107 107
108 // A vector of plugins that have been loaded successfully. 108 // A vector of plugins that have been loaded successfully.
109 std::vector<webkit::WebPluginInfo> loaded_plugins_; 109 std::vector<webkit::WebPluginInfo> loaded_plugins_;
110 110
111 // The callback and message loop on which the callback will be run when the 111 // The callback and message loop on which the callback will be run when the
112 // plugin loading process has been completed. 112 // plugin loading process has been completed.
113 std::vector<PendingCallback> callbacks_; 113 std::vector<PendingCallback> callbacks_;
114 114
115 // The time at which plugin loading started. 115 // The time at which plugin loading started.
116 base::TimeTicks load_start_time_; 116 base::TimeTicks load_start_time_;
117 117
118 friend class MockPluginLoaderPosix; 118 friend class MockPluginLoaderPosix;
119 DISALLOW_COPY_AND_ASSIGN(PluginLoaderPosix); 119 DISALLOW_COPY_AND_ASSIGN(PluginLoaderPosix);
120 }; 120 };
121 121
122 #endif // CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_ 122 #endif // CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/idbbindingutilities_browsertest.cc ('k') | content/browser/plugin_loader_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698