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

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

Issue 9699054: rlz: Hook up on mac, switch to chrome's network stack on win. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 #include "printing/printed_document.h" 159 #include "printing/printed_document.h"
160 #include "ui/base/l10n/l10n_util_win.h" 160 #include "ui/base/l10n/l10n_util_win.h"
161 #endif // defined(OS_WIN) 161 #endif // defined(OS_WIN)
162 162
163 #if defined(OS_MACOSX) 163 #if defined(OS_MACOSX)
164 #include <Security/Security.h> 164 #include <Security/Security.h>
165 165
166 #include "base/mac/scoped_nsautorelease_pool.h" 166 #include "base/mac/scoped_nsautorelease_pool.h"
167 #include "chrome/browser/mac/install_from_dmg.h" 167 #include "chrome/browser/mac/install_from_dmg.h"
168 #include "chrome/browser/mac/keystone_glue.h" 168 #include "chrome/browser/mac/keystone_glue.h"
169 #include "chrome/browser/rlz/rlz.h"
169 #endif 170 #endif
170 171
171 #if defined(TOOLKIT_VIEWS) 172 #if defined(TOOLKIT_VIEWS)
172 #include "ui/views/focus/accelerator_handler.h" 173 #include "ui/views/focus/accelerator_handler.h"
173 #endif 174 #endif
174 175
175 #if defined(TOOLKIT_USES_GTK) 176 #if defined(TOOLKIT_USES_GTK)
176 #include "chrome/browser/ui/gtk/gtk_util.h" 177 #include "chrome/browser/ui/gtk/gtk_util.h"
177 #include "ui/gfx/gtk_util.h" 178 #include "ui/gfx/gtk_util.h"
178 #endif 179 #endif
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 1603
1603 // Registers Chrome with the Windows Restart Manager, which will restore the 1604 // Registers Chrome with the Windows Restart Manager, which will restore the
1604 // Chrome session when the computer is restarted after a system update. 1605 // Chrome session when the computer is restarted after a system update.
1605 // This could be run as late as WM_QUERYENDSESSION for system update reboots, 1606 // This could be run as late as WM_QUERYENDSESSION for system update reboots,
1606 // but should run on startup if extended to handle crashes/hangs/patches. 1607 // but should run on startup if extended to handle crashes/hangs/patches.
1607 // Also, better to run once here than once for each HWND's WM_QUERYENDSESSION. 1608 // Also, better to run once here than once for each HWND's WM_QUERYENDSESSION.
1608 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { 1609 if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
1609 ChromeBrowserMainPartsWin::RegisterApplicationRestart( 1610 ChromeBrowserMainPartsWin::RegisterApplicationRestart(
1610 parsed_command_line()); 1611 parsed_command_line());
1611 } 1612 }
1613 #endif // OS_WIN
1612 1614
1615 #if defined(OS_WIN) || defined(OS_MACOSX)
1613 #if defined(GOOGLE_CHROME_BUILD) 1616 #if defined(GOOGLE_CHROME_BUILD)
1614 // Init the RLZ library. This just binds the dll and schedules a task on the 1617 // Init the RLZ library. This just binds the dll and schedules a task on the
1615 // file thread to be run sometime later. If this is the first run we record 1618 // file thread to be run sometime later. If this is the first run we record
1616 // the installation event. 1619 // the installation event.
1617 bool google_search_default = false; 1620 bool google_search_default = false;
1618 TemplateURLService* template_url_service = 1621 TemplateURLService* template_url_service =
1619 TemplateURLServiceFactory::GetForProfile(profile_); 1622 TemplateURLServiceFactory::GetForProfile(profile_);
1620 if (template_url_service) { 1623 if (template_url_service) {
1621 const TemplateURL* url_template = 1624 const TemplateURL* url_template =
1622 template_url_service->GetDefaultSearchProvider(); 1625 template_url_service->GetDefaultSearchProvider();
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1966 if (base::win::GetVersion() <= base::win::VERSION_XP) 1969 if (base::win::GetVersion() <= base::win::VERSION_XP)
1967 uma_name += "_XP"; 1970 uma_name += "_XP";
1968 1971
1969 uma_name += "_PreRead_"; 1972 uma_name += "_PreRead_";
1970 uma_name += pre_read_percentage; 1973 uma_name += pre_read_percentage;
1971 AddPreReadHistogramTime(uma_name.c_str(), time); 1974 AddPreReadHistogramTime(uma_name.c_str(), time);
1972 } 1975 }
1973 #endif 1976 #endif
1974 #endif 1977 #endif
1975 } 1978 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698