Chromium Code Reviews| Index: chrome/browser/chromeos/browser_main_chromeos.cc |
| =================================================================== |
| --- chrome/browser/chromeos/browser_main_chromeos.cc (revision 100153) |
| +++ chrome/browser/chromeos/browser_main_chromeos.cc (working copy) |
| @@ -10,6 +10,7 @@ |
| #include "chrome/browser/chromeos/boot_times_loader.h" |
| #include "chrome/browser/chromeos/cros/cros_library.h" |
| #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" |
| +#include "chrome/browser/defaults.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "content/common/main_function_params.h" |
| #include "net/base/network_change_notifier.h" |
| @@ -63,7 +64,19 @@ |
| chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| } |
| +void BrowserMainPartsChromeos::PreEarlyInitialization() { |
| + BrowserMainPartsGtk::PreEarlyInitialization(); |
| + if (parsed_command_line().HasSwitch(switches::kGuestSession)) { |
| + // Disable sync and extensions if we're in "browse without sign-in" mode. |
| + CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); |
| + singleton_command_line->AppendSwitch(switches::kDisableSync); |
| + singleton_command_line->AppendSwitch(switches::kDisableExtensions); |
| + browser_defaults::bookmarks_enabled = false; |
| + } |
| +} |
| + |
| void BrowserMainPartsChromeos::PreMainMessageLoopStart() { |
| + BrowserMainPartsGtk::PreMainMessageLoopStart(); |
| // Initialize CrosLibrary only for the browser, unless running tests |
| // (which do their own CrosLibrary setup). |
| if (!parameters().ui_task) { |
| @@ -77,7 +90,7 @@ |
| } |
| void BrowserMainPartsChromeos::PostMainMessageLoopStart() { |
| - BrowserMainPartsPosix::PostMainMessageLoopStart(); |
| + BrowserMainPartsGtk::PostMainMessageLoopStart(); |
|
tony
2011/09/08 17:21:04
Posix seems better here since there is no BrowserM
jam
2011/09/08 17:43:01
ok. it seemed odd to me that it wouldn't call its
|
| MessageLoopForUI* message_loop = MessageLoopForUI::current(); |
| message_loop->AddObserver(g_message_loop_observer.Pointer()); |
| } |