OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/options/advanced_contents_gtk.h" | 5 #include "chrome/browser/gtk/options/advanced_contents_gtk.h" |
6 | 6 |
7 #include <sys/types.h> | 7 #include <sys/types.h> |
8 #include <sys/wait.h> | 8 #include <sys/wait.h> |
9 | 9 |
| 10 #include <string> |
| 11 #include <vector> |
| 12 |
10 #include "app/gtk_signal.h" | 13 #include "app/gtk_signal.h" |
11 #include "app/gtk_util.h" | 14 #include "app/gtk_util.h" |
12 #include "app/l10n_util.h" | 15 #include "app/l10n_util.h" |
13 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 17 #include "base/env_var.h" |
14 #include "base/file_util.h" | 18 #include "base/file_util.h" |
15 #include "base/linux_util.h" | 19 #include "base/linux_util.h" |
16 #include "base/path_service.h" | 20 #include "base/path_service.h" |
17 #include "base/process_util.h" | 21 #include "base/process_util.h" |
18 #include "base/string_tokenizer.h" | 22 #include "base/string_tokenizer.h" |
19 #include "chrome/browser/browser_list.h" | 23 #include "chrome/browser/browser_list.h" |
20 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
21 #include "chrome/browser/download/download_manager.h" | 25 #include "chrome/browser/download/download_manager.h" |
22 #include "chrome/browser/fonts_languages_window.h" | 26 #include "chrome/browser/fonts_languages_window.h" |
23 #include "chrome/browser/gtk/accessible_widget_helper_gtk.h" | 27 #include "chrome/browser/gtk/accessible_widget_helper_gtk.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 gtk_util::IndentWidget(button_hbox), | 389 gtk_util::IndentWidget(button_hbox), |
386 FALSE, FALSE, 0); | 390 FALSE, FALSE, 0); |
387 } | 391 } |
388 | 392 |
389 // static | 393 // static |
390 void NetworkSection::OnChangeProxiesButtonClicked(GtkButton *button, | 394 void NetworkSection::OnChangeProxiesButtonClicked(GtkButton *button, |
391 NetworkSection* section) { | 395 NetworkSection* section) { |
392 section->UserMetricsRecordAction(UserMetricsAction("Options_ChangeProxies"), | 396 section->UserMetricsRecordAction(UserMetricsAction("Options_ChangeProxies"), |
393 NULL); | 397 NULL); |
394 | 398 |
395 scoped_ptr<base::EnvironmentVariableGetter> env_getter( | 399 scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create()); |
396 base::EnvironmentVariableGetter::Create()); | |
397 | 400 |
398 ProxyConfigCommand command; | 401 ProxyConfigCommand command; |
399 bool found_command = false; | 402 bool found_command = false; |
400 switch (base::GetDesktopEnvironment(env_getter.get())) { | 403 switch (base::GetDesktopEnvironment(env_getter.get())) { |
401 case base::DESKTOP_ENVIRONMENT_GNOME: { | 404 case base::DESKTOP_ENVIRONMENT_GNOME: { |
402 size_t index; | 405 size_t index; |
403 ProxyConfigCommand commands[2]; | 406 ProxyConfigCommand commands[2]; |
404 commands[0].argv = kGNOMEProxyConfigCommand; | 407 commands[0].argv = kGNOMEProxyConfigCommand; |
405 commands[1].argv = kOldGNOMEProxyConfigCommand; | 408 commands[1].argv = kOldGNOMEProxyConfigCommand; |
406 found_command = SearchPATH(commands, 2, &index); | 409 found_command = SearchPATH(commands, 2, &index); |
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT), | 1215 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT), |
1213 web_content_section_->get_page_widget(), false); | 1216 web_content_section_->get_page_widget(), false); |
1214 | 1217 |
1215 security_section_.reset(new SecuritySection(profile_)); | 1218 security_section_.reset(new SecuritySection(profile_)); |
1216 options_builder.AddOptionGroup( | 1219 options_builder.AddOptionGroup( |
1217 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY), | 1220 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY), |
1218 security_section_->get_page_widget(), false); | 1221 security_section_->get_page_widget(), false); |
1219 | 1222 |
1220 page_ = options_builder.get_page_widget(); | 1223 page_ = options_builder.get_page_widget(); |
1221 } | 1224 } |
OLD | NEW |