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 <windows.h> | 5 #include <windows.h> |
6 #include <shellapi.h> | 6 #include <shellapi.h> |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 | 522 |
523 // Have Chrome plugins write their data to the profile directory. | 523 // Have Chrome plugins write their data to the profile directory. |
524 PluginService::GetInstance()->SetChromePluginDataDir(profile->GetPath()); | 524 PluginService::GetInstance()->SetChromePluginDataDir(profile->GetPath()); |
525 | 525 |
526 // Initialize the CertStore. | 526 // Initialize the CertStore. |
527 CertStore::Initialize(); | 527 CertStore::Initialize(); |
528 | 528 |
529 // Prepare for memory caching of SDCH dictionaries. | 529 // Prepare for memory caching of SDCH dictionaries. |
530 SdchManager sdch_manager; // Construct singleton database. | 530 SdchManager sdch_manager; // Construct singleton database. |
531 sdch_manager.set_sdch_fetcher(new SdchDictionaryFetcher); | 531 sdch_manager.set_sdch_fetcher(new SdchDictionaryFetcher); |
532 // TODO(jar): Use default to "" so that all domains are supported. | 532 // Use default of "" so that all domains are supported. |
533 std::string switch_domain(".google.com"); // Provide default test domain. | 533 std::string switch_domain(""); |
534 if (parsed_command_line.HasSwitch(switches::kSdchFilter)) { | 534 if (parsed_command_line.HasSwitch(switches::kSdchFilter)) { |
535 switch_domain = | 535 switch_domain = |
536 WideToASCII(parsed_command_line.GetSwitchValue(switches::kSdchFilter)); | 536 WideToASCII(parsed_command_line.GetSwitchValue(switches::kSdchFilter)); |
537 } | 537 } |
538 sdch_manager.EnableSdchSupport(switch_domain); | 538 sdch_manager.EnableSdchSupport(switch_domain); |
539 | 539 |
540 MetricsService* metrics = NULL; | 540 MetricsService* metrics = NULL; |
541 if (!parsed_command_line.HasSwitch(switches::kDisableMetrics)) { | 541 if (!parsed_command_line.HasSwitch(switches::kDisableMetrics)) { |
542 if (parsed_command_line.HasSwitch(switches::kMetricsRecordingOnly)) { | 542 if (parsed_command_line.HasSwitch(switches::kMetricsRecordingOnly)) { |
543 local_state->transient()->SetBoolean(prefs::kMetricsReportingEnabled, | 543 local_state->transient()->SetBoolean(prefs::kMetricsReportingEnabled, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 // The following should ONLY be called when in single threaded mode. It is | 594 // The following should ONLY be called when in single threaded mode. It is |
595 // unsafe to do this cleanup if other threads are still active. | 595 // unsafe to do this cleanup if other threads are still active. |
596 // It is also very unnecessary, so I'm only doing this in debug to satisfy | 596 // It is also very unnecessary, so I'm only doing this in debug to satisfy |
597 // purify. | 597 // purify. |
598 if (tracking_objects) | 598 if (tracking_objects) |
599 tracked_objects::ThreadData::ShutdownSingleThreadedCleanup(); | 599 tracked_objects::ThreadData::ShutdownSingleThreadedCleanup(); |
600 #endif // NDEBUG | 600 #endif // NDEBUG |
601 | 601 |
602 return result_code; | 602 return result_code; |
603 } | 603 } |
OLD | NEW |