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

Side by Side Diff: chrome/browser/prefs/browser_prefs.cc

Issue 10692110: screenshot disabling policy (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed comments (2), hooking into GrabWindowSnapshot instead of ChromeShellDelegate, rebased on … Created 8 years, 5 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/prefs/browser_prefs.h" 5 #include "chrome/browser/prefs/browser_prefs.h"
6 6
7 #include "chrome/browser/about_flags.h" 7 #include "chrome/browser/about_flags.h"
8 #include "chrome/browser/accessibility/invert_bubble_prefs.h" 8 #include "chrome/browser/accessibility/invert_bubble_prefs.h"
9 #include "chrome/browser/autofill/autofill_manager.h" 9 #include "chrome/browser/autofill/autofill_manager.h"
10 #include "chrome/browser/background/background_mode_manager.h" 10 #include "chrome/browser/background/background_mode_manager.h"
11 #include "chrome/browser/bookmarks/bookmark_utils.h" 11 #include "chrome/browser/bookmarks/bookmark_utils.h"
12 #include "chrome/browser/browser_shutdown.h" 12 #include "chrome/browser/browser_shutdown.h"
13 #include "chrome/browser/chrome_content_browser_client.h" 13 #include "chrome/browser/chrome_content_browser_client.h"
14 #include "chrome/browser/content_settings/host_content_settings_map.h" 14 #include "chrome/browser/content_settings/host_content_settings_map.h"
15 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 15 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
16 #include "chrome/browser/debugger/devtools_window.h" 16 #include "chrome/browser/debugger/devtools_window.h"
17 #include "chrome/browser/download/download_prefs.h" 17 #include "chrome/browser/download/download_prefs.h"
18 #include "chrome/browser/extensions/api/commands/command_service.h" 18 #include "chrome/browser/extensions/api/commands/command_service.h"
19 #include "chrome/browser/extensions/api/tabs/tabs.h"
19 #include "chrome/browser/extensions/apps_promo.h" 20 #include "chrome/browser/extensions/apps_promo.h"
20 #include "chrome/browser/extensions/component_loader.h" 21 #include "chrome/browser/extensions/component_loader.h"
21 #include "chrome/browser/extensions/extension_prefs.h" 22 #include "chrome/browser/extensions/extension_prefs.h"
22 #include "chrome/browser/extensions/extension_web_ui.h" 23 #include "chrome/browser/extensions/extension_web_ui.h"
23 #include "chrome/browser/external_protocol/external_protocol_handler.h" 24 #include "chrome/browser/external_protocol/external_protocol_handler.h"
24 #include "chrome/browser/geolocation/geolocation_prefs.h" 25 #include "chrome/browser/geolocation/geolocation_prefs.h"
25 #include "chrome/browser/google/google_url_tracker.h" 26 #include "chrome/browser/google/google_url_tracker.h"
26 #include "chrome/browser/google/google_url_tracker_factory.h" 27 #include "chrome/browser/google/google_url_tracker_factory.h"
27 #include "chrome/browser/instant/instant_controller.h" 28 #include "chrome/browser/instant/instant_controller.h"
28 #include "chrome/browser/intents/web_intents_util.h" 29 #include "chrome/browser/intents/web_intents_util.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "chrome/browser/ui/network_profile_bubble.h" 62 #include "chrome/browser/ui/network_profile_bubble.h"
62 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 63 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
63 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h" 64 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
64 #include "chrome/browser/ui/startup/autolaunch_prompt.h" 65 #include "chrome/browser/ui/startup/autolaunch_prompt.h"
65 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" 66 #include "chrome/browser/ui/tabs/pinned_tab_codec.h"
66 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" 67 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
67 #include "chrome/browser/ui/webui/flags_ui.h" 68 #include "chrome/browser/ui/webui/flags_ui.h"
68 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 69 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
69 #include "chrome/browser/ui/webui/plugins_ui.h" 70 #include "chrome/browser/ui/webui/plugins_ui.h"
70 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" 71 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h"
72 #include "chrome/browser/ui/window_snapshot/window_snapshot.h"
71 #include "chrome/browser/upgrade_detector.h" 73 #include "chrome/browser/upgrade_detector.h"
72 #include "chrome/browser/web_resource/promo_resource_service.h" 74 #include "chrome/browser/web_resource/promo_resource_service.h"
73 #include "chrome/common/pref_names.h" 75 #include "chrome/common/pref_names.h"
74 #include "content/public/browser/render_process_host.h" 76 #include "content/public/browser/render_process_host.h"
75 77
76 #if defined(OS_MACOSX) 78 #if defined(OS_MACOSX)
77 #include "chrome/browser/ui/cocoa/confirm_quit.h" 79 #include "chrome/browser/ui/cocoa/confirm_quit.h"
78 #include "chrome/browser/ui/cocoa/presentation_mode_prefs.h" 80 #include "chrome/browser/ui/cocoa/presentation_mode_prefs.h"
79 #include "chrome/browser/ui/startup/obsolete_os_prompt.h" 81 #include "chrome/browser/ui/startup/obsolete_os_prompt.h"
80 #endif 82 #endif
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 ManagedMode::RegisterPrefs(local_state); 166 ManagedMode::RegisterPrefs(local_state);
165 PromoResourceService::RegisterPrefs(local_state); 167 PromoResourceService::RegisterPrefs(local_state);
166 UpgradeDetector::RegisterPrefs(local_state); 168 UpgradeDetector::RegisterPrefs(local_state);
167 #endif 169 #endif
168 170
169 #if defined(ENABLE_PRINTING) 171 #if defined(ENABLE_PRINTING)
170 printing::PrintJobManager::RegisterPrefs(local_state); 172 printing::PrintJobManager::RegisterPrefs(local_state);
171 #endif 173 #endif
172 174
173 #if defined(OS_CHROMEOS) 175 #if defined(OS_CHROMEOS)
176 browser::RegisterPrefs(local_state);
174 chromeos::AudioHandler::RegisterPrefs(local_state); 177 chromeos::AudioHandler::RegisterPrefs(local_state);
175 chromeos::language_prefs::RegisterPrefs(local_state); 178 chromeos::language_prefs::RegisterPrefs(local_state);
176 chromeos::DataPromoNotification::RegisterPrefs(local_state); 179 chromeos::DataPromoNotification::RegisterPrefs(local_state);
177 chromeos::ProxyConfigServiceImpl::RegisterPrefs(local_state); 180 chromeos::ProxyConfigServiceImpl::RegisterPrefs(local_state);
178 chromeos::UserManager::RegisterPrefs(local_state); 181 chromeos::UserManager::RegisterPrefs(local_state);
179 chromeos::ServicesCustomizationDocument::RegisterPrefs(local_state); 182 chromeos::ServicesCustomizationDocument::RegisterPrefs(local_state);
180 chromeos::signed_settings_cache::RegisterPrefs(local_state); 183 chromeos::signed_settings_cache::RegisterPrefs(local_state);
181 chromeos::WizardController::RegisterPrefs(local_state); 184 chromeos::WizardController::RegisterPrefs(local_state);
182 policy::AutoEnrollmentClient::RegisterPrefs(local_state); 185 policy::AutoEnrollmentClient::RegisterPrefs(local_state);
183 policy::DeviceStatusCollector::RegisterPrefs(local_state); 186 policy::DeviceStatusCollector::RegisterPrefs(local_state);
184 #endif 187 #endif
185 188
186 #if defined(OS_MACOSX) 189 #if defined(OS_MACOSX)
187 RegisterObsoleteOSInfobarPrefs(local_state); 190 RegisterObsoleteOSInfobarPrefs(local_state);
188 confirm_quit::RegisterLocalState(local_state); 191 confirm_quit::RegisterLocalState(local_state);
189 #endif 192 #endif
190 } 193 }
191 194
192 void RegisterUserPrefs(PrefService* user_prefs) { 195 void RegisterUserPrefs(PrefService* user_prefs) {
193 // User prefs 196 // User prefs
194 AlternateErrorPageTabObserver::RegisterUserPrefs(user_prefs); 197 AlternateErrorPageTabObserver::RegisterUserPrefs(user_prefs);
195 AutofillManager::RegisterUserPrefs(user_prefs); 198 AutofillManager::RegisterUserPrefs(user_prefs);
196 bookmark_utils::RegisterUserPrefs(user_prefs); 199 bookmark_utils::RegisterUserPrefs(user_prefs);
200 CaptureVisibleTabFunction::RegisterUserPrefs(user_prefs);
197 ChromeContentBrowserClient::RegisterUserPrefs(user_prefs); 201 ChromeContentBrowserClient::RegisterUserPrefs(user_prefs);
198 ChromeVersionService::RegisterUserPrefs(user_prefs); 202 ChromeVersionService::RegisterUserPrefs(user_prefs);
199 chrome_browser_net::HttpServerPropertiesManager::RegisterPrefs(user_prefs); 203 chrome_browser_net::HttpServerPropertiesManager::RegisterPrefs(user_prefs);
200 chrome_browser_net::Predictor::RegisterUserPrefs(user_prefs); 204 chrome_browser_net::Predictor::RegisterUserPrefs(user_prefs);
201 DownloadPrefs::RegisterUserPrefs(user_prefs); 205 DownloadPrefs::RegisterUserPrefs(user_prefs);
202 ExtensionSettingsHandler::RegisterUserPrefs(user_prefs); 206 ExtensionSettingsHandler::RegisterUserPrefs(user_prefs);
203 GAIAInfoUpdateService::RegisterUserPrefs(user_prefs); 207 GAIAInfoUpdateService::RegisterUserPrefs(user_prefs);
204 HostContentSettingsMap::RegisterUserPrefs(user_prefs); 208 HostContentSettingsMap::RegisterUserPrefs(user_prefs);
205 IncognitoModePrefs::RegisterUserPrefs(user_prefs); 209 IncognitoModePrefs::RegisterUserPrefs(user_prefs);
206 InstantController::RegisterUserPrefs(user_prefs); 210 InstantController::RegisterUserPrefs(user_prefs);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 333 }
330 local_state->ClearPref(prefs::kLastPromptedGoogleURL); 334 local_state->ClearPref(prefs::kLastPromptedGoogleURL);
331 335
332 current_version |= GOOGLE_URL_TRACKER_PREFS; 336 current_version |= GOOGLE_URL_TRACKER_PREFS;
333 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, 337 local_state->SetInteger(prefs::kMultipleProfilePrefMigration,
334 current_version); 338 current_version);
335 } 339 }
336 } 340 }
337 341
338 } // namespace chrome 342 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698