| 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 <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 #include "extensions/browser/extension_protocols.h" | 216 #include "extensions/browser/extension_protocols.h" |
| 217 #include "extensions/common/features/feature_provider.h" | 217 #include "extensions/common/features/feature_provider.h" |
| 218 #include "extensions/components/javascript_dialog_extensions_client/javascript_d
ialog_extension_client_impl.h" | 218 #include "extensions/components/javascript_dialog_extensions_client/javascript_d
ialog_extension_client_impl.h" |
| 219 #endif // defined(ENABLE_EXTENSIONS) | 219 #endif // defined(ENABLE_EXTENSIONS) |
| 220 | 220 |
| 221 #if defined(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) | 221 #if defined(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) |
| 222 #include "printing/printed_document.h" | 222 #include "printing/printed_document.h" |
| 223 #endif // defined(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) | 223 #endif // defined(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) |
| 224 | 224 |
| 225 #if defined(ENABLE_RLZ) | 225 #if defined(ENABLE_RLZ) |
| 226 #include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h" | 226 #include "chrome/browser/rlz/rlz.h" |
| 227 #include "components/rlz/rlz_tracker.h" | |
| 228 #endif // defined(ENABLE_RLZ) | 227 #endif // defined(ENABLE_RLZ) |
| 229 | 228 |
| 230 #if defined(ENABLE_WEBRTC) | 229 #if defined(ENABLE_WEBRTC) |
| 231 #include "chrome/browser/media/webrtc_log_util.h" | 230 #include "chrome/browser/media/webrtc_log_util.h" |
| 232 #endif // defined(ENABLE_WEBRTC) | 231 #endif // defined(ENABLE_WEBRTC) |
| 233 | 232 |
| 234 #if defined(USE_AURA) | 233 #if defined(USE_AURA) |
| 235 #include "ui/aura/env.h" | 234 #include "ui/aura/env.h" |
| 236 #endif // defined(USE_AURA) | 235 #endif // defined(USE_AURA) |
| 237 | 236 |
| (...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1445 | 1444 |
| 1446 #if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1445 #if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
| 1447 // Init the RLZ library. This just binds the dll and schedules a task on the | 1446 // Init the RLZ library. This just binds the dll and schedules a task on the |
| 1448 // file thread to be run sometime later. If this is the first run we record | 1447 // file thread to be run sometime later. If this is the first run we record |
| 1449 // the installation event. | 1448 // the installation event. |
| 1450 PrefService* pref_service = profile_->GetPrefs(); | 1449 PrefService* pref_service = profile_->GetPrefs(); |
| 1451 int ping_delay = first_run::IsChromeFirstRun() ? master_prefs_->ping_delay : | 1450 int ping_delay = first_run::IsChromeFirstRun() ? master_prefs_->ping_delay : |
| 1452 pref_service->GetInteger(first_run::GetPingDelayPrefName().c_str()); | 1451 pref_service->GetInteger(first_run::GetPingDelayPrefName().c_str()); |
| 1453 // Negative ping delay means to send ping immediately after a first search is | 1452 // Negative ping delay means to send ping immediately after a first search is |
| 1454 // recorded. | 1453 // recorded. |
| 1455 rlz::RLZTracker::SetRlzDelegate( | 1454 RLZTracker::InitRlzFromProfileDelayed( |
| 1456 make_scoped_ptr(new ChromeRLZTrackerDelegate)); | 1455 profile_, first_run::IsChromeFirstRun(), ping_delay < 0, |
| 1457 rlz::RLZTracker::InitRlzDelayed( | 1456 base::TimeDelta::FromMilliseconds(abs(ping_delay))); |
| 1458 first_run::IsChromeFirstRun(), ping_delay < 0, | |
| 1459 base::TimeDelta::FromMilliseconds(abs(ping_delay)), | |
| 1460 ChromeRLZTrackerDelegate::IsGoogleDefaultSearch(profile_), | |
| 1461 ChromeRLZTrackerDelegate::IsGoogleHomePage(profile_), | |
| 1462 ChromeRLZTrackerDelegate::IsGoogleInStartpages(profile_)); | |
| 1463 #endif // defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1457 #endif // defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
| 1464 | 1458 |
| 1465 // Configure modules that need access to resources. | 1459 // Configure modules that need access to resources. |
| 1466 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 1460 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
| 1467 | 1461 |
| 1468 // In unittest mode, this will do nothing. In normal mode, this will create | 1462 // In unittest mode, this will do nothing. In normal mode, this will create |
| 1469 // the global IntranetRedirectDetector instance, which will promptly go to | 1463 // the global IntranetRedirectDetector instance, which will promptly go to |
| 1470 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards | 1464 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards |
| 1471 // to see if it should do anything else. | 1465 // to see if it should do anything else. |
| 1472 // | 1466 // |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1786 chromeos::CrosSettings::Shutdown(); | 1780 chromeos::CrosSettings::Shutdown(); |
| 1787 #endif // defined(OS_CHROMEOS) | 1781 #endif // defined(OS_CHROMEOS) |
| 1788 #endif // defined(OS_ANDROID) | 1782 #endif // defined(OS_ANDROID) |
| 1789 } | 1783 } |
| 1790 | 1784 |
| 1791 // Public members: | 1785 // Public members: |
| 1792 | 1786 |
| 1793 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1787 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1794 chrome_extra_parts_.push_back(parts); | 1788 chrome_extra_parts_.push_back(parts); |
| 1795 } | 1789 } |
| OLD | NEW |