Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 #include "chrome/common/chrome_paths.h" | 42 #include "chrome/common/chrome_paths.h" |
| 43 #include "chrome/common/chrome_switches.h" | 43 #include "chrome/common/chrome_switches.h" |
| 44 #include "chrome/common/jstemplate_builder.h" | 44 #include "chrome/common/jstemplate_builder.h" |
| 45 #include "chrome/common/main_function_params.h" | 45 #include "chrome/common/main_function_params.h" |
| 46 #include "chrome/common/pref_names.h" | 46 #include "chrome/common/pref_names.h" |
| 47 #include "chrome/common/pref_service.h" | 47 #include "chrome/common/pref_service.h" |
| 48 #include "chrome/common/result_codes.h" | 48 #include "chrome/common/result_codes.h" |
| 49 #include "grit/chromium_strings.h" | 49 #include "grit/chromium_strings.h" |
| 50 #include "grit/generated_resources.h" | 50 #include "grit/generated_resources.h" |
| 51 #include "grit/net_resources.h" | 51 #include "grit/net_resources.h" |
| 52 #include "net/base/cookie_monster.h" | |
| 52 #include "net/base/net_module.h" | 53 #include "net/base/net_module.h" |
| 53 #include "net/http/http_network_session.h" | 54 #include "net/http/http_network_session.h" |
| 54 | 55 |
| 55 #if defined(OS_POSIX) | 56 #if defined(OS_POSIX) |
| 56 // TODO(port): get rid of this include. It's used just to provide declarations | 57 // TODO(port): get rid of this include. It's used just to provide declarations |
| 57 // and stub definitions for classes we encouter during the porting effort. | 58 // and stub definitions for classes we encouter during the porting effort. |
| 58 #include "chrome/common/temp_scaffolding_stubs.h" | 59 #include "chrome/common/temp_scaffolding_stubs.h" |
| 59 #include <signal.h> | 60 #include <signal.h> |
| 60 #endif | 61 #endif |
| 61 | 62 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 } | 359 } |
| 359 } | 360 } |
| 360 | 361 |
| 361 if (!parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) { | 362 if (!parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) { |
| 362 // Display a warning if the user is running windows 2000. | 363 // Display a warning if the user is running windows 2000. |
| 363 // TODO(port): We should probably change this to a "check for minimum | 364 // TODO(port): We should probably change this to a "check for minimum |
| 364 // requirements" function, implemented by each platform. | 365 // requirements" function, implemented by each platform. |
| 365 CheckForWin2000(); | 366 CheckForWin2000(); |
| 366 } | 367 } |
| 367 | 368 |
| 369 if (parsed_command_line.HasSwitch(switches::kEnableFileCookies)) { | |
| 370 // Enable cookie storage for file:// URLs. Must do this before the first | |
| 371 // Profile (and therefore first CookieMonster) is created. | |
|
Dean McNamee
2009/05/14 07:34:38
the first
| |
| 372 net::CookieMonster::EnableFileScheme(); | |
| 373 } | |
| 374 | |
| 368 // Initialize histogram statistics gathering system. | 375 // Initialize histogram statistics gathering system. |
| 369 StatisticsRecorder statistics; | 376 StatisticsRecorder statistics; |
| 370 | 377 |
| 371 // Initialize the shared instance of user data manager. | 378 // Initialize the shared instance of user data manager. |
| 372 scoped_ptr<UserDataManager> user_data_manager(UserDataManager::Create()); | 379 scoped_ptr<UserDataManager> user_data_manager(UserDataManager::Create()); |
| 373 | 380 |
| 374 // Try to create/load the profile. | 381 // Try to create/load the profile. |
| 375 ProfileManager* profile_manager = browser_process->profile_manager(); | 382 ProfileManager* profile_manager = browser_process->profile_manager(); |
| 376 Profile* profile = profile_manager->GetDefaultProfile(user_data_dir); | 383 Profile* profile = profile_manager->GetDefaultProfile(user_data_dir); |
| 377 if (!profile) { | 384 if (!profile) { |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 658 if (metrics) | 665 if (metrics) |
| 659 metrics->Stop(); | 666 metrics->Stop(); |
| 660 | 667 |
| 661 // browser_shutdown takes care of deleting browser_process, so we need to | 668 // browser_shutdown takes care of deleting browser_process, so we need to |
| 662 // release it. | 669 // release it. |
| 663 browser_process.release(); | 670 browser_process.release(); |
| 664 browser_shutdown::Shutdown(); | 671 browser_shutdown::Shutdown(); |
| 665 | 672 |
| 666 return result_code; | 673 return result_code; |
| 667 } | 674 } |
| OLD | NEW |