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

Side by Side Diff: chrome/browser/ui/webui/options2/browser_options_handler2.cc

Issue 10698053: Breaks compile on Linux Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
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/options2/browser_options_handler2.h" 5 #include "chrome/browser/ui/webui/options2/browser_options_handler2.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 28 matching lines...) Expand all
39 #include "chrome/browser/search_engines/template_url_service.h" 39 #include "chrome/browser/search_engines/template_url_service.h"
40 #include "chrome/browser/search_engines/template_url_service_factory.h" 40 #include "chrome/browser/search_engines/template_url_service_factory.h"
41 #include "chrome/browser/service/service_process_control.h" 41 #include "chrome/browser/service/service_process_control.h"
42 #include "chrome/browser/signin/signin_manager.h" 42 #include "chrome/browser/signin/signin_manager.h"
43 #include "chrome/browser/signin/signin_manager_factory.h" 43 #include "chrome/browser/signin/signin_manager_factory.h"
44 #include "chrome/browser/sync/profile_sync_service.h" 44 #include "chrome/browser/sync/profile_sync_service.h"
45 #include "chrome/browser/sync/profile_sync_service_factory.h" 45 #include "chrome/browser/sync/profile_sync_service_factory.h"
46 #include "chrome/browser/sync/sync_ui_util.h" 46 #include "chrome/browser/sync/sync_ui_util.h"
47 #include "chrome/browser/themes/theme_service.h" 47 #include "chrome/browser/themes/theme_service.h"
48 #include "chrome/browser/themes/theme_service_factory.h" 48 #include "chrome/browser/themes/theme_service_factory.h"
49 #include "chrome/browser/ui/chrome_select_file_policy.h"
50 #include "chrome/browser/ui/options/options_util.h" 49 #include "chrome/browser/ui/options/options_util.h"
51 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 50 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
52 #include "chrome/browser/ui/webui/favicon_source.h" 51 #include "chrome/browser/ui/webui/favicon_source.h"
53 #include "chrome/browser/ui/webui/web_ui_util.h" 52 #include "chrome/browser/ui/webui/web_ui_util.h"
54 #include "chrome/common/chrome_constants.h" 53 #include "chrome/common/chrome_constants.h"
55 #include "chrome/common/chrome_notification_types.h" 54 #include "chrome/common/chrome_notification_types.h"
56 #include "chrome/common/chrome_paths.h" 55 #include "chrome/common/chrome_paths.h"
57 #include "chrome/common/chrome_switches.h" 56 #include "chrome/common/chrome_switches.h"
58 #include "chrome/common/net/gaia/google_service_auth_error.h" 57 #include "chrome/common/net/gaia/google_service_auth_error.h"
59 #include "chrome/common/pref_names.h" 58 #include "chrome/common/pref_names.h"
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 "autoLoginVisible", 1027 "autoLoginVisible",
1029 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) && 1028 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) &&
1030 service->IsSyncEnabledAndLoggedIn() && service->IsSyncTokenAvailable()); 1029 service->IsSyncEnabledAndLoggedIn() && service->IsSyncTokenAvailable());
1031 1030
1032 return sync_status.Pass(); 1031 return sync_status.Pass();
1033 } 1032 }
1034 1033
1035 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1034 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1036 const ListValue* args) { 1035 const ListValue* args) {
1037 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1036 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1038 select_folder_dialog_ = SelectFileDialog::Create( 1037 select_folder_dialog_ = SelectFileDialog::Create(this);
1039 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
1040 select_folder_dialog_->SelectFile( 1038 select_folder_dialog_->SelectFile(
1041 SelectFileDialog::SELECT_FOLDER, 1039 SelectFileDialog::SELECT_FOLDER,
1042 l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE), 1040 l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE),
1043 pref_service->GetFilePath(prefs::kDownloadDefaultDirectory), 1041 pref_service->GetFilePath(prefs::kDownloadDefaultDirectory),
1044 NULL, 0, FILE_PATH_LITERAL(""), 1042 NULL, 0, FILE_PATH_LITERAL(""), web_ui()->GetWebContents(),
1045 web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), NULL); 1043 web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), NULL);
1046 } 1044 }
1047 1045
1048 void BrowserOptionsHandler::FileSelected(const FilePath& path, int index, 1046 void BrowserOptionsHandler::FileSelected(const FilePath& path, int index,
1049 void* params) { 1047 void* params) {
1050 content::RecordAction(UserMetricsAction("Options_SetDownloadDirectory")); 1048 content::RecordAction(UserMetricsAction("Options_SetDownloadDirectory"));
1051 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1049 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1052 pref_service->SetFilePath(prefs::kDownloadDefaultDirectory, path); 1050 pref_service->SetFilePath(prefs::kDownloadDefaultDirectory, path);
1053 } 1051 }
1054 1052
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 } 1420 }
1423 1421
1424 void BrowserOptionsHandler::SetupSSLConfigSettings() { 1422 void BrowserOptionsHandler::SetupSSLConfigSettings() {
1425 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); 1423 base::FundamentalValue checked(rev_checking_enabled_.GetValue());
1426 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); 1424 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged());
1427 web_ui()->CallJavascriptFunction( 1425 web_ui()->CallJavascriptFunction(
1428 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); 1426 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled);
1429 } 1427 }
1430 1428
1431 } // namespace options2 1429 } // namespace options2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698