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" |
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1225 base::FilePath::StringType(), | 1225 base::FilePath::StringType(), |
1226 web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), | 1226 web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), |
1227 NULL); | 1227 NULL); |
1228 } | 1228 } |
1229 | 1229 |
1230 void BrowserOptionsHandler::FileSelected(const base::FilePath& path, int index, | 1230 void BrowserOptionsHandler::FileSelected(const base::FilePath& path, int index, |
1231 void* params) { | 1231 void* params) { |
1232 content::RecordAction(UserMetricsAction("Options_SetDownloadDirectory")); | 1232 content::RecordAction(UserMetricsAction("Options_SetDownloadDirectory")); |
1233 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); | 1233 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); |
1234 pref_service->SetFilePath(prefs::kDownloadDefaultDirectory, path); | 1234 pref_service->SetFilePath(prefs::kDownloadDefaultDirectory, path); |
1235 pref_service->SetFilePath(prefs::kSaveFileDefaultDirectory, path); | |
asanka
2013/04/24 22:03:13
We should also call ChromeDownloadManagerDelegate:
benjhayden
2013/04/30 21:11:12
Moot -- merged CDMD::last_download_path_ with kSav
| |
1235 } | 1236 } |
1236 | 1237 |
1237 void BrowserOptionsHandler::OnCloudPrintSetupClosed() { | 1238 void BrowserOptionsHandler::OnCloudPrintSetupClosed() { |
1238 #if !defined(OS_CHROMEOS) | 1239 #if !defined(OS_CHROMEOS) |
1239 if (cloud_print_connector_ui_enabled_) | 1240 if (cloud_print_connector_ui_enabled_) |
1240 SetupCloudPrintConnectorSection(); | 1241 SetupCloudPrintConnectorSection(); |
1241 #endif | 1242 #endif |
1242 } | 1243 } |
1243 | 1244 |
1244 #if defined(OS_CHROMEOS) | 1245 #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() || | 1533 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || |
1533 is_extension_controlled); | 1534 is_extension_controlled); |
1534 base::FundamentalValue extension_controlled(is_extension_controlled); | 1535 base::FundamentalValue extension_controlled(is_extension_controlled); |
1535 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", | 1536 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", |
1536 disabled, extension_controlled); | 1537 disabled, extension_controlled); |
1537 | 1538 |
1538 #endif // !defined(OS_CHROMEOS) | 1539 #endif // !defined(OS_CHROMEOS) |
1539 } | 1540 } |
1540 | 1541 |
1541 } // namespace options | 1542 } // namespace options |
OLD | NEW |