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

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

Issue 23258005: Give SxS distribution its own registration GUIDs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add linker dependency from metro_driver to installer_util Created 7 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
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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #include "chrome/browser/chromeos/settings/cros_settings.h" 100 #include "chrome/browser/chromeos/settings/cros_settings.h"
101 #include "chrome/browser/policy/browser_policy_connector.h" 101 #include "chrome/browser/policy/browser_policy_connector.h"
102 #include "chrome/browser/ui/browser_window.h" 102 #include "chrome/browser/ui/browser_window.h"
103 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.h" 103 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.h"
104 #include "chromeos/dbus/dbus_thread_manager.h" 104 #include "chromeos/dbus/dbus_thread_manager.h"
105 #include "chromeos/dbus/power_manager_client.h" 105 #include "chromeos/dbus/power_manager_client.h"
106 #include "ui/gfx/image/image_skia.h" 106 #include "ui/gfx/image/image_skia.h"
107 #endif // defined(OS_CHROMEOS) 107 #endif // defined(OS_CHROMEOS)
108 108
109 #if defined(OS_WIN) 109 #if defined(OS_WIN)
110 #include <windows.h>
110 #include "chrome/installer/util/auto_launch_util.h" 111 #include "chrome/installer/util/auto_launch_util.h"
112 #include "chrome/installer/util/browser_distribution.h"
111 #endif // defined(OS_WIN) 113 #endif // defined(OS_WIN)
112 114
113 using content::BrowserContext; 115 using content::BrowserContext;
114 using content::BrowserThread; 116 using content::BrowserThread;
115 using content::DownloadManager; 117 using content::DownloadManager;
116 using content::OpenURLParams; 118 using content::OpenURLParams;
117 using content::Referrer; 119 using content::Referrer;
118 using content::UserMetricsAction; 120 using content::UserMetricsAction;
119 121
120 namespace options { 122 namespace options {
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 #if !defined(OS_CHROMEOS) 743 #if !defined(OS_CHROMEOS)
742 profile_pref_registrar_.Add( 744 profile_pref_registrar_.Add(
743 prefs::kProxy, 745 prefs::kProxy,
744 base::Bind(&BrowserOptionsHandler::SetupProxySettingsSection, 746 base::Bind(&BrowserOptionsHandler::SetupProxySettingsSection,
745 base::Unretained(this))); 747 base::Unretained(this)));
746 #endif // !defined(OS_CHROMEOS) 748 #endif // !defined(OS_CHROMEOS)
747 } 749 }
748 750
749 void BrowserOptionsHandler::InitializePage() { 751 void BrowserOptionsHandler::InitializePage() {
750 page_initialized_ = true; 752 page_initialized_ = true;
753 #if defined(OS_WIN)
754 // On Windows, allow a magic key combination to enable SxS distributions to
755 // be set as the default browser. This allows testing scenarios which were
756 // previously not possible on Windows 8.
757 if (GetAsyncKeyState(VK_SHIFT) && GetAsyncKeyState(VK_F12)) {
758 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
759 dist->DebugEnableSetAsDefault();
760 }
761 #endif
751 762
752 OnTemplateURLServiceChanged(); 763 OnTemplateURLServiceChanged();
753 764
754 ObserveThemeChanged(); 765 ObserveThemeChanged();
755 OnStateChanged(); 766 OnStateChanged();
756 UpdateDefaultBrowserState(); 767 UpdateDefaultBrowserState();
757 768
758 SetupMetricsReportingSettingVisibility(); 769 SetupMetricsReportingSettingVisibility();
759 SetupPasswordGenerationSettingVisibility(); 770 SetupPasswordGenerationSettingVisibility();
760 SetupFontSizeSelector(); 771 SetupFontSizeSelector();
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 const ProfileInfoCache& cache = 1817 const ProfileInfoCache& cache =
1807 g_browser_process->profile_manager()->GetProfileInfoCache(); 1818 g_browser_process->profile_manager()->GetProfileInfoCache();
1808 for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i) { 1819 for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i) {
1809 if (existing_managed_user_id == cache.GetManagedUserIdOfProfileAtIndex(i)) 1820 if (existing_managed_user_id == cache.GetManagedUserIdOfProfileAtIndex(i))
1810 return false; 1821 return false;
1811 } 1822 }
1812 return true; 1823 return true;
1813 } 1824 }
1814 1825
1815 } // namespace options 1826 } // namespace options
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/setup/uninstall.cc » ('j') | chrome/installer/util/browser_distribution.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698