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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 2033173002: Moving Breakpad Windows specific logic to lower layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comment. Created 4 years, 6 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
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/ui/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 if (ExtractDoubleValue(args, &zoom_factor)) { 1651 if (ExtractDoubleValue(args, &zoom_factor)) {
1652 ChromeZoomLevelPrefs* zoom_level_prefs = 1652 ChromeZoomLevelPrefs* zoom_level_prefs =
1653 Profile::FromWebUI(web_ui())->GetZoomLevelPrefs(); 1653 Profile::FromWebUI(web_ui())->GetZoomLevelPrefs();
1654 DCHECK(zoom_level_prefs); 1654 DCHECK(zoom_level_prefs);
1655 zoom_level_prefs->SetDefaultZoomLevelPref( 1655 zoom_level_prefs->SetDefaultZoomLevelPref(
1656 content::ZoomFactorToZoomLevel(zoom_factor)); 1656 content::ZoomFactorToZoomLevel(zoom_factor));
1657 } 1657 }
1658 } 1658 }
1659 1659
1660 void BrowserOptionsHandler::HandleRestartBrowser(const base::ListValue* args) { 1660 void BrowserOptionsHandler::HandleRestartBrowser(const base::ListValue* args) {
1661 #if defined(OS_WIN)
1662 // On Windows Breakpad will upload crash reports if the breakpad pipe name
1663 // environment variable is defined. So we undefine this environment variable
1664 // before restarting, as the restarted processes will inherit their
1665 // environment variables from ours, thus suppressing crash uploads.
1666 if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled()) {
1667 HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
1668 if (exe_module) {
1669 typedef void (__cdecl *ClearBreakpadPipeEnvVar)();
1670 ClearBreakpadPipeEnvVar clear = reinterpret_cast<ClearBreakpadPipeEnvVar>(
1671 GetProcAddress(exe_module, "ClearBreakpadPipeEnvironmentVariable"));
1672 if (clear)
1673 clear();
1674 }
1675 }
1676 #endif
1677
1678 chrome::AttemptRestart(); 1661 chrome::AttemptRestart();
1679 } 1662 }
1680 1663
1681 void BrowserOptionsHandler::HandleRequestProfilesInfo( 1664 void BrowserOptionsHandler::HandleRequestProfilesInfo(
1682 const base::ListValue* args) { 1665 const base::ListValue* args) {
1683 SendProfilesInfo(); 1666 SendProfilesInfo();
1684 } 1667 }
1685 1668
1686 #if !defined(OS_CHROMEOS) 1669 #if !defined(OS_CHROMEOS)
1687 void BrowserOptionsHandler::ShowNetworkProxySettings( 1670 void BrowserOptionsHandler::ShowNetworkProxySettings(
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 2162
2180 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2163 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2181 #if defined(OS_CHROMEOS) 2164 #if defined(OS_CHROMEOS)
2182 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2165 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2183 #else 2166 #else
2184 return true; 2167 return true;
2185 #endif 2168 #endif
2186 } 2169 }
2187 2170
2188 } // namespace options 2171 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents_iterator_unittest.cc ('k') | chrome/browser/ui/webui/settings/system_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698