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

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: Addressing review comments 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 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 if (template_url_service) { 1863 if (template_url_service) {
1864 const TemplateURL* url_template = 1864 const TemplateURL* url_template =
1865 template_url_service->GetDefaultSearchProvider(); 1865 template_url_service->GetDefaultSearchProvider();
1866 if (url_template) { 1866 if (url_template) {
1867 const TemplateURLRef* urlref = url_template->url(); 1867 const TemplateURLRef* urlref = url_template->url();
1868 if (urlref) { 1868 if (urlref) {
1869 google_search_default = urlref->HasGoogleBaseURLs(); 1869 google_search_default = urlref->HasGoogleBaseURLs();
1870 } 1870 }
1871 } 1871 }
1872 } 1872 }
1873 // TODO(rogerta): For now, always passing false for google_homeapge_default
1874 // argument, so that functionality is disabled. A follow up CL will set it
1875 // correctly.
1873 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay, 1876 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay,
1874 google_search_default); 1877 google_search_default, false);
1875 #endif // GOOGLE_CHROME_BUILD 1878 #endif // GOOGLE_CHROME_BUILD
1876 #endif // OS_WIN 1879 #endif // OS_WIN
1877 1880
1878 // Configure modules that need access to resources. 1881 // Configure modules that need access to resources.
1879 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); 1882 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
1880 1883
1881 // In unittest mode, this will do nothing. In normal mode, this will create 1884 // In unittest mode, this will do nothing. In normal mode, this will create
1882 // the global GoogleURLTracker and IntranetRedirectDetector instances, which 1885 // the global GoogleURLTracker and IntranetRedirectDetector instances, which
1883 // will promptly go to sleep for five and seven seconds, respectively (to 1886 // will promptly go to sleep for five and seven seconds, respectively (to
1884 // avoid slowing startup), and wake up afterwards to see if they should do 1887 // 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
2146 #if defined(OS_CHROMEOS) 2149 #if defined(OS_CHROMEOS)
2147 // To be precise, logout (browser shutdown) is not yet done, but the 2150 // To be precise, logout (browser shutdown) is not yet done, but the
2148 // remaining work is negligible, hence we say LogoutDone here. 2151 // remaining work is negligible, hence we say LogoutDone here.
2149 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 2152 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
2150 false); 2153 false);
2151 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 2154 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
2152 #endif 2155 #endif
2153 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); 2156 TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
2154 return result_code; 2157 return result_code;
2155 } 2158 }
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