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

Side by Side Diff: chrome/app/chrome_dll_main.cc

Issue 99126: Mutual exclusion between gconf and the glib main loop. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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 | Annotate | Revision Log
« no previous file with comments | « base/message_pump_glib.cc ('k') | net/proxy/proxy_config_service_linux.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 // TODO(port): the ifdefs in here are a first step towards trying to determine 5 // TODO(port): the ifdefs in here are a first step towards trying to determine
6 // the correct abstraction for all the OS functionality required at this 6 // the correct abstraction for all the OS functionality required at this
7 // stage of process initialization. It should not be taken as a final 7 // stage of process initialization. It should not be taken as a final
8 // abstraction. 8 // abstraction.
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 NOTIMPLEMENTED(); 433 NOTIMPLEMENTED();
434 #endif 434 #endif
435 } else if (process_type == switches::kWorkerProcess) { 435 } else if (process_type == switches::kWorkerProcess) {
436 #if defined(OS_WIN) 436 #if defined(OS_WIN)
437 rv = WorkerMain(main_params); 437 rv = WorkerMain(main_params);
438 #else 438 #else
439 NOTIMPLEMENTED(); 439 NOTIMPLEMENTED();
440 #endif 440 #endif
441 } else if (process_type.empty()) { 441 } else if (process_type.empty()) {
442 #if defined(OS_LINUX) 442 #if defined(OS_LINUX)
443 // Glib/GDK type system and threading initializations. Needed at 443 // Glib type system initialization. Needed at least for gconf (in
444 // least for gconf usage in net/proxy/proxy_config_service_linux.cc. 444 // net/proxy/proxy_config_service_linux.cc).
445 // TODO(sdoyon): confirm whether gconf truly needs this. If so,
446 // the GTK main loop (message pump) must also be made to call
447 // gdk_threads_enter/leave(). Similar issue with the clipboard
448 // (estade@ deanm@).
449 g_type_init(); 445 g_type_init();
450 g_thread_init(NULL);
451 gdk_threads_init();
452 // gtk_init() can change |argc| and |argv|, but nobody else uses them. 446 // gtk_init() can change |argc| and |argv|, but nobody else uses them.
453 gtk_init(&argc, const_cast<char***>(&argv)); 447 gtk_init(&argc, const_cast<char***>(&argv));
454 SetUpGLibLogHandler(); 448 SetUpGLibLogHandler();
455 #endif 449 #endif
456 450
457 ScopedOleInitializer ole_initializer; 451 ScopedOleInitializer ole_initializer;
458 rv = BrowserMain(main_params); 452 rv = BrowserMain(main_params);
459 } else { 453 } else {
460 NOTREACHED() << "Unknown process type"; 454 NOTREACHED() << "Unknown process type";
461 } 455 }
462 456
463 if (!process_type.empty()) { 457 if (!process_type.empty()) {
464 ResourceBundle::CleanupSharedInstance(); 458 ResourceBundle::CleanupSharedInstance();
465 } 459 }
466 460
467 #if defined(OS_WIN) 461 #if defined(OS_WIN)
468 #ifdef _CRTDBG_MAP_ALLOC 462 #ifdef _CRTDBG_MAP_ALLOC
469 _CrtDumpMemoryLeaks(); 463 _CrtDumpMemoryLeaks();
470 #endif // _CRTDBG_MAP_ALLOC 464 #endif // _CRTDBG_MAP_ALLOC
471 465
472 _Module.Term(); 466 _Module.Term();
473 #endif 467 #endif
474 468
475 logging::CleanupChromeLogging(); 469 logging::CleanupChromeLogging();
476 470
477 return rv; 471 return rv;
478 } 472 }
OLDNEW
« no previous file with comments | « base/message_pump_glib.cc ('k') | net/proxy/proxy_config_service_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698