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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1449 | 1450 |
1450 #if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1451 #if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
1451 // Init the RLZ library. This just binds the dll and schedules a task on the | 1452 // Init the RLZ library. This just binds the dll and schedules a task on the |
1452 // file thread to be run sometime later. If this is the first run we record | 1453 // file thread to be run sometime later. If this is the first run we record |
1453 // the installation event. | 1454 // the installation event. |
1454 PrefService* pref_service = profile_->GetPrefs(); | 1455 PrefService* pref_service = profile_->GetPrefs(); |
1455 int ping_delay = first_run::IsChromeFirstRun() ? master_prefs_->ping_delay : | 1456 int ping_delay = first_run::IsChromeFirstRun() ? master_prefs_->ping_delay : |
1456 pref_service->GetInteger(first_run::GetPingDelayPrefName().c_str()); | 1457 pref_service->GetInteger(first_run::GetPingDelayPrefName().c_str()); |
1457 // Negative ping delay means to send ping immediately after a first search is | 1458 // Negative ping delay means to send ping immediately after a first search is |
1458 // recorded. | 1459 // recorded. |
1459 RLZTracker::InitRlzFromProfileDelayed( | 1460 rlz::RLZTracker::SetRlzDelegate( |
1460 profile_, first_run::IsChromeFirstRun(), ping_delay < 0, | 1461 make_scoped_ptr(new ChromeRLZTrackerDelegate)); |
1461 base::TimeDelta::FromMilliseconds(abs(ping_delay))); | 1462 rlz::RLZTracker::InitRlzDelayed( |
| 1463 first_run::IsChromeFirstRun(), ping_delay < 0, |
| 1464 base::TimeDelta::FromMilliseconds(abs(ping_delay)), |
| 1465 ChromeRLZTrackerDelegate::IsGoogleDefaultSearch(profile_), |
| 1466 ChromeRLZTrackerDelegate::IsGoogleHomepage(profile_), |
| 1467 ChromeRLZTrackerDelegate::IsGoogleInStartpages(profile_)); |
1462 #endif // defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1468 #endif // defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
1463 | 1469 |
1464 // Configure modules that need access to resources. | 1470 // Configure modules that need access to resources. |
1465 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 1471 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
1466 | 1472 |
1467 // In unittest mode, this will do nothing. In normal mode, this will create | 1473 // In unittest mode, this will do nothing. In normal mode, this will create |
1468 // the global IntranetRedirectDetector instance, which will promptly go to | 1474 // the global IntranetRedirectDetector instance, which will promptly go to |
1469 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards | 1475 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards |
1470 // to see if it should do anything else. | 1476 // to see if it should do anything else. |
1471 // | 1477 // |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1785 chromeos::CrosSettings::Shutdown(); | 1791 chromeos::CrosSettings::Shutdown(); |
1786 #endif // defined(OS_CHROMEOS) | 1792 #endif // defined(OS_CHROMEOS) |
1787 #endif // defined(OS_ANDROID) | 1793 #endif // defined(OS_ANDROID) |
1788 } | 1794 } |
1789 | 1795 |
1790 // Public members: | 1796 // Public members: |
1791 | 1797 |
1792 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1798 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1793 chrome_extra_parts_.push_back(parts); | 1799 chrome_extra_parts_.push_back(parts); |
1794 } | 1800 } |
OLD | NEW |