OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 16 matching lines...) Expand all Loading... | |
27 #include "chrome/common/profiling.h" | 27 #include "chrome/common/profiling.h" |
28 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
29 #include "chrome/plugin/chrome_content_plugin_client.h" | 29 #include "chrome/plugin/chrome_content_plugin_client.h" |
30 #include "chrome/renderer/chrome_content_renderer_client.h" | 30 #include "chrome/renderer/chrome_content_renderer_client.h" |
31 #include "chrome/utility/chrome_content_utility_client.h" | 31 #include "chrome/utility/chrome_content_utility_client.h" |
32 #include "content/common/content_counters.h" | 32 #include "content/common/content_counters.h" |
33 #include "content/public/browser/render_process_host.h" | 33 #include "content/public/browser/render_process_host.h" |
34 #include "content/public/common/content_client.h" | 34 #include "content/public/common/content_client.h" |
35 #include "content/public/common/content_paths.h" | 35 #include "content/public/common/content_paths.h" |
36 #include "content/public/common/content_switches.h" | 36 #include "content/public/common/content_switches.h" |
37 #include "net/url_request/url_request.h" | |
37 #include "ui/base/resource/resource_bundle.h" | 38 #include "ui/base/resource/resource_bundle.h" |
38 #include "ui/base/ui_base_switches.h" | 39 #include "ui/base/ui_base_switches.h" |
39 | 40 |
40 #if defined(OS_WIN) | 41 #if defined(OS_WIN) |
41 #include <algorithm> | 42 #include <algorithm> |
42 #include <atlbase.h> | 43 #include <atlbase.h> |
43 #include <malloc.h> | 44 #include <malloc.h> |
44 #include "base/string_util.h" | 45 #include "base/string_util.h" |
45 #include "base/win/registry.h" | 46 #include "base/win/registry.h" |
46 #include "chrome/browser/policy/policy_path_parser.h" | 47 #include "chrome/browser/policy/policy_path_parser.h" |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
387 #endif // OS_POSIX | 388 #endif // OS_POSIX |
388 | 389 |
389 struct MainFunction { | 390 struct MainFunction { |
390 const char* name; | 391 const char* name; |
391 int (*function)(const content::MainFunctionParams&); | 392 int (*function)(const content::MainFunctionParams&); |
392 }; | 393 }; |
393 | 394 |
394 } // namespace | 395 } // namespace |
395 | 396 |
396 ChromeMainDelegate::ChromeMainDelegate() { | 397 ChromeMainDelegate::ChromeMainDelegate() { |
398 // Chrome disallows cookies per default. All code paths that need to use | |
wtc
2012/03/28 17:51:05
Nit: per default => by default
jochen (gone - plz use gerrit)
2012/03/29 18:33:24
Done.
| |
399 // cookies need to go through one of chrome's URLRequestContexts which have | |
400 // a ChromeNetworkDelegate attached that selectively allows cookies again. | |
401 net::URLRequest::SetDefaultCookiePolicyToBlock(); | |
jam
2012/03/27 19:17:35
why do this in chrome/app instead of chrome/browse
jochen (gone - plz use gerrit)
2012/03/29 18:33:24
Done.
| |
397 } | 402 } |
398 | 403 |
399 ChromeMainDelegate::~ChromeMainDelegate() { | 404 ChromeMainDelegate::~ChromeMainDelegate() { |
400 } | 405 } |
401 | 406 |
402 bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) { | 407 bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) { |
403 #if defined(OS_CHROMEOS) | 408 #if defined(OS_CHROMEOS) |
404 chromeos::BootTimesLoader::Get()->SaveChromeMainStats(); | 409 chromeos::BootTimesLoader::Get()->SaveChromeMainStats(); |
405 #endif | 410 #endif |
406 | 411 |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
736 | 741 |
737 #if defined(USE_LINUX_BREAKPAD) | 742 #if defined(USE_LINUX_BREAKPAD) |
738 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets | 743 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets |
739 // this up for the browser process in a different manner. | 744 // this up for the browser process in a different manner. |
740 InitCrashReporter(); | 745 InitCrashReporter(); |
741 #endif | 746 #endif |
742 | 747 |
743 InitializeChromeContentClient(process_type); | 748 InitializeChromeContentClient(process_type); |
744 } | 749 } |
745 #endif // OS_MACOSX | 750 #endif // OS_MACOSX |
OLD | NEW |