Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
| 15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 16 #include "base/prefs/pref_service.h" | 16 #include "base/prefs/pref_service.h" |
| 17 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
| 18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
| 20 #include "base/value_conversions.h" | 20 #include "base/value_conversions.h" |
| 21 #include "base/values.h" | 21 #include "base/values.h" |
| 22 #include "chrome/browser/auto_launch_trial.h" | 22 #include "chrome/browser/auto_launch_trial.h" |
| 23 #include "chrome/browser/browser_process.h" | 23 #include "chrome/browser/browser_process.h" |
| 24 #include "chrome/browser/chrome_page_zoom.h" | 24 #include "chrome/browser/chrome_page_zoom.h" |
| 25 #include "chrome/browser/custom_home_pages_table_model.h" | 25 #include "chrome/browser/custom_home_pages_table_model.h" |
| 26 #include "chrome/browser/download/chrome_download_manager_delegate.h" | |
| 26 #include "chrome/browser/download/download_prefs.h" | 27 #include "chrome/browser/download/download_prefs.h" |
| 28 #include "chrome/browser/download/download_service.h" | |
| 29 #include "chrome/browser/download/download_service_factory.h" | |
|
Randy Smith (Not in Mondays)
2013/05/01 19:18:43
Why are all the extra includes needed now?
benjhayden
2013/05/06 20:05:19
Done.
| |
| 27 #include "chrome/browser/gpu/gpu_mode_manager.h" | 30 #include "chrome/browser/gpu/gpu_mode_manager.h" |
| 28 #include "chrome/browser/lifetime/application_lifetime.h" | 31 #include "chrome/browser/lifetime/application_lifetime.h" |
| 29 #include "chrome/browser/net/url_fixer_upper.h" | 32 #include "chrome/browser/net/url_fixer_upper.h" |
| 30 #include "chrome/browser/prefs/session_startup_pref.h" | 33 #include "chrome/browser/prefs/session_startup_pref.h" |
| 31 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 34 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
| 32 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" | 35 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" |
| 33 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" | 36 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" |
| 34 #include "chrome/browser/printing/cloud_print/cloud_print_url.h" | 37 #include "chrome/browser/printing/cloud_print/cloud_print_url.h" |
| 35 #include "chrome/browser/profiles/profile_info_cache.h" | 38 #include "chrome/browser/profiles/profile_info_cache.h" |
| 36 #include "chrome/browser/profiles/profile_info_util.h" | 39 #include "chrome/browser/profiles/profile_info_util.h" |
| (...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1225 base::FilePath::StringType(), | 1228 base::FilePath::StringType(), |
| 1226 web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), | 1229 web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), |
| 1227 NULL); | 1230 NULL); |
| 1228 } | 1231 } |
| 1229 | 1232 |
| 1230 void BrowserOptionsHandler::FileSelected(const base::FilePath& path, int index, | 1233 void BrowserOptionsHandler::FileSelected(const base::FilePath& path, int index, |
| 1231 void* params) { | 1234 void* params) { |
| 1232 content::RecordAction(UserMetricsAction("Options_SetDownloadDirectory")); | 1235 content::RecordAction(UserMetricsAction("Options_SetDownloadDirectory")); |
| 1233 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); | 1236 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); |
| 1234 pref_service->SetFilePath(prefs::kDownloadDefaultDirectory, path); | 1237 pref_service->SetFilePath(prefs::kDownloadDefaultDirectory, path); |
| 1238 pref_service->SetFilePath(prefs::kSaveFileDefaultDirectory, path); | |
| 1235 } | 1239 } |
| 1236 | 1240 |
| 1237 void BrowserOptionsHandler::OnCloudPrintSetupClosed() { | 1241 void BrowserOptionsHandler::OnCloudPrintSetupClosed() { |
| 1238 #if !defined(OS_CHROMEOS) | 1242 #if !defined(OS_CHROMEOS) |
| 1239 if (cloud_print_connector_ui_enabled_) | 1243 if (cloud_print_connector_ui_enabled_) |
| 1240 SetupCloudPrintConnectorSection(); | 1244 SetupCloudPrintConnectorSection(); |
| 1241 #endif | 1245 #endif |
| 1242 } | 1246 } |
| 1243 | 1247 |
| 1244 #if defined(OS_CHROMEOS) | 1248 #if defined(OS_CHROMEOS) |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1532 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || | 1536 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || |
| 1533 is_extension_controlled); | 1537 is_extension_controlled); |
| 1534 base::FundamentalValue extension_controlled(is_extension_controlled); | 1538 base::FundamentalValue extension_controlled(is_extension_controlled); |
| 1535 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", | 1539 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", |
| 1536 disabled, extension_controlled); | 1540 disabled, extension_controlled); |
| 1537 | 1541 |
| 1538 #endif // !defined(OS_CHROMEOS) | 1542 #endif // !defined(OS_CHROMEOS) |
| 1539 } | 1543 } |
| 1540 | 1544 |
| 1541 } // namespace options | 1545 } // namespace options |
| OLD | NEW |