Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: chrome/browser/browser_main.cc

Issue 7736001: Adding unit tests to RLZ code. Refactoring RLZ code to make it more testable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Taking out dependence on PageTransition::HOME_PAGE. Will fix once home page feature is implemented Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/rlz/rlz.h » ('j') | chrome/browser/rlz/rlz.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_main.h" 5 #include "chrome/browser/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 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 if (template_url_service) { 1856 if (template_url_service) {
1857 const TemplateURL* url_template = 1857 const TemplateURL* url_template =
1858 template_url_service->GetDefaultSearchProvider(); 1858 template_url_service->GetDefaultSearchProvider();
1859 if (url_template) { 1859 if (url_template) {
1860 const TemplateURLRef* urlref = url_template->url(); 1860 const TemplateURLRef* urlref = url_template->url();
1861 if (urlref) { 1861 if (urlref) {
1862 google_search_default = urlref->HasGoogleBaseURLs(); 1862 google_search_default = urlref->HasGoogleBaseURLs();
1863 } 1863 }
1864 } 1864 }
1865 } 1865 }
1866 // TODO(rogerta): For now, always passing false for google_homeapge_default
1867 // argument, so that functionality is disabled. A follow up CL will set it
1868 // correctly.
1866 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay, 1869 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay,
1867 google_search_default); 1870 google_search_default, false);
1868 #endif // GOOGLE_CHROME_BUILD 1871 #endif // GOOGLE_CHROME_BUILD
1869 #endif // OS_WIN 1872 #endif // OS_WIN
1870 1873
1871 // Configure modules that need access to resources. 1874 // Configure modules that need access to resources.
1872 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); 1875 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
1873 1876
1874 // In unittest mode, this will do nothing. In normal mode, this will create 1877 // In unittest mode, this will do nothing. In normal mode, this will create
1875 // the global GoogleURLTracker and IntranetRedirectDetector instances, which 1878 // the global GoogleURLTracker and IntranetRedirectDetector instances, which
1876 // will promptly go to sleep for five and seven seconds, respectively (to 1879 // will promptly go to sleep for five and seven seconds, respectively (to
1877 // avoid slowing startup), and wake up afterwards to see if they should do 1880 // avoid slowing startup), and wake up afterwards to see if they should do
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
2139 #if defined(OS_CHROMEOS) 2142 #if defined(OS_CHROMEOS)
2140 // To be precise, logout (browser shutdown) is not yet done, but the 2143 // To be precise, logout (browser shutdown) is not yet done, but the
2141 // remaining work is negligible, hence we say LogoutDone here. 2144 // remaining work is negligible, hence we say LogoutDone here.
2142 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 2145 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
2143 false); 2146 false);
2144 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 2147 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
2145 #endif 2148 #endif
2146 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); 2149 TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
2147 return result_code; 2150 return result_code;
2148 } 2151 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/rlz/rlz.h » ('j') | chrome/browser/rlz/rlz.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698