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