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/browser/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 profile_(NULL), | 557 profile_(NULL), |
558 run_message_loop_(true), | 558 run_message_loop_(true), |
559 notify_result_(ProcessSingleton::PROCESS_NONE), | 559 notify_result_(ProcessSingleton::PROCESS_NONE), |
560 is_first_run_(false), | 560 is_first_run_(false), |
561 first_run_ui_bypass_(false), | 561 first_run_ui_bypass_(false), |
562 local_state_(NULL), | 562 local_state_(NULL), |
563 restart_last_session_(false) { | 563 restart_last_session_(false) { |
564 // If we're running tests (ui_task is non-null). | 564 // If we're running tests (ui_task is non-null). |
565 if (parameters.ui_task) | 565 if (parameters.ui_task) |
566 browser_defaults::enable_help_app = false; | 566 browser_defaults::enable_help_app = false; |
| 567 |
| 568 // Chrome disallows cookies by default. All code paths that want to use |
| 569 // cookies need to go through one of Chrome's URLRequestContexts which have |
| 570 // a ChromeNetworkDelegate attached that selectively allows cookies again. |
| 571 net::URLRequest::SetDefaultCookiePolicyToBlock(); |
567 } | 572 } |
568 | 573 |
569 ChromeBrowserMainParts::~ChromeBrowserMainParts() { | 574 ChromeBrowserMainParts::~ChromeBrowserMainParts() { |
570 for (int i = static_cast<int>(chrome_extra_parts_.size())-1; i >= 0; --i) | 575 for (int i = static_cast<int>(chrome_extra_parts_.size())-1; i >= 0; --i) |
571 delete chrome_extra_parts_[i]; | 576 delete chrome_extra_parts_[i]; |
572 chrome_extra_parts_.clear(); | 577 chrome_extra_parts_.clear(); |
573 } | 578 } |
574 | 579 |
575 // This will be called after the command-line has been mutated by about:flags | 580 // This will be called after the command-line has been mutated by about:flags |
576 void ChromeBrowserMainParts::SetupMetricsAndFieldTrials() { | 581 void ChromeBrowserMainParts::SetupMetricsAndFieldTrials() { |
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1957 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1962 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1958 uma_name += "_XP"; | 1963 uma_name += "_XP"; |
1959 | 1964 |
1960 uma_name += "_PreRead_"; | 1965 uma_name += "_PreRead_"; |
1961 uma_name += pre_read_percentage; | 1966 uma_name += pre_read_percentage; |
1962 AddPreReadHistogramTime(uma_name.c_str(), time); | 1967 AddPreReadHistogramTime(uma_name.c_str(), time); |
1963 } | 1968 } |
1964 #endif | 1969 #endif |
1965 #endif | 1970 #endif |
1966 } | 1971 } |
OLD | NEW |