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

Side by Side Diff: chrome/browser/browser_process_impl.h

Issue 67145: Linux: move X operations from the IO to UI2 thread. (Closed)
Patch Set: ... Created 11 years, 8 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/browser/browser_process.h ('k') | chrome/browser/browser_process_impl.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 // When each service is created, we set a flag indicating this. At this point, 5 // When each service is created, we set a flag indicating this. At this point,
6 // the service initialization could fail or succeed. This allows us to remember 6 // the service initialization could fail or succeed. This allows us to remember
7 // if we tried to create a service, and not try creating it over and over if 7 // if we tried to create a service, and not try creating it over and over if
8 // the creation failed. 8 // the creation failed.
9 9
10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H__ 10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H__
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 return file_thread_.get(); 66 return file_thread_.get();
67 } 67 }
68 68
69 virtual base::Thread* db_thread() { 69 virtual base::Thread* db_thread() {
70 DCHECK(CalledOnValidThread()); 70 DCHECK(CalledOnValidThread());
71 if (!created_db_thread_) 71 if (!created_db_thread_)
72 CreateDBThread(); 72 CreateDBThread();
73 return db_thread_.get(); 73 return db_thread_.get();
74 } 74 }
75 75
76 #if defined(OS_LINUX)
77 virtual base::Thread* background_x11_thread() {
78 DCHECK(CalledOnValidThread());
79 // The BACKGROUND_X11 thread is created when the IO thread is created.
80 if (!created_io_thread_)
81 CreateIOThread();
82 return background_x11_thread_.get();
83 }
84 #endif
85
76 virtual ProfileManager* profile_manager() { 86 virtual ProfileManager* profile_manager() {
77 DCHECK(CalledOnValidThread()); 87 DCHECK(CalledOnValidThread());
78 if (!created_profile_manager_) 88 if (!created_profile_manager_)
79 CreateProfileManager(); 89 CreateProfileManager();
80 return profile_manager_.get(); 90 return profile_manager_.get();
81 } 91 }
82 92
83 virtual PrefService* local_state() { 93 virtual PrefService* local_state() {
84 DCHECK(CalledOnValidThread()); 94 DCHECK(CalledOnValidThread());
85 if (!created_local_state_) 95 if (!created_local_state_)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void InitBrokerServices(sandbox::BrokerServices* broker_services); 214 void InitBrokerServices(sandbox::BrokerServices* broker_services);
205 215
206 bool created_resource_dispatcher_host_; 216 bool created_resource_dispatcher_host_;
207 scoped_ptr<ResourceDispatcherHost> resource_dispatcher_host_; 217 scoped_ptr<ResourceDispatcherHost> resource_dispatcher_host_;
208 218
209 bool created_metrics_service_; 219 bool created_metrics_service_;
210 scoped_ptr<MetricsService> metrics_service_; 220 scoped_ptr<MetricsService> metrics_service_;
211 221
212 bool created_io_thread_; 222 bool created_io_thread_;
213 scoped_ptr<base::Thread> io_thread_; 223 scoped_ptr<base::Thread> io_thread_;
224 #if defined(OS_LINUX)
225 // This shares a created flag with the IO thread.
226 scoped_ptr<base::Thread> background_x11_thread_;
227 #endif
214 228
215 bool created_file_thread_; 229 bool created_file_thread_;
216 scoped_ptr<base::Thread> file_thread_; 230 scoped_ptr<base::Thread> file_thread_;
217 231
218 bool created_db_thread_; 232 bool created_db_thread_;
219 scoped_ptr<base::Thread> db_thread_; 233 scoped_ptr<base::Thread> db_thread_;
220 234
221 bool created_profile_manager_; 235 bool created_profile_manager_;
222 scoped_ptr<ProfileManager> profile_manager_; 236 scoped_ptr<ProfileManager> profile_manager_;
223 237
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 bool checked_for_new_frames_; 272 bool checked_for_new_frames_;
259 bool using_new_frames_; 273 bool using_new_frames_;
260 274
261 // An event that notifies when we are shutting-down. 275 // An event that notifies when we are shutting-down.
262 scoped_ptr<base::WaitableEvent> shutdown_event_; 276 scoped_ptr<base::WaitableEvent> shutdown_event_;
263 277
264 DISALLOW_EVIL_CONSTRUCTORS(BrowserProcessImpl); 278 DISALLOW_EVIL_CONSTRUCTORS(BrowserProcessImpl);
265 }; 279 };
266 280
267 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H__ 281 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H__
OLDNEW
« no previous file with comments | « chrome/browser/browser_process.h ('k') | chrome/browser/browser_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698