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/shell_integration_linux.h" | 5 #include "chrome/browser/shell_integration_linux.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <glib.h> | 8 #include <glib.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include <sys/stat.h> | 10 #include <sys/stat.h> |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 350 |
351 // Allow any reply that starts with "yes". | 351 // Allow any reply that starts with "yes". |
352 return (reply.find("yes") == 0) ? ShellIntegration::IS_DEFAULT_WEB_CLIENT : | 352 return (reply.find("yes") == 0) ? ShellIntegration::IS_DEFAULT_WEB_CLIENT : |
353 ShellIntegration::NOT_DEFAULT_WEB_CLIENT; | 353 ShellIntegration::NOT_DEFAULT_WEB_CLIENT; |
354 #endif | 354 #endif |
355 } | 355 } |
356 | 356 |
357 } // namespace | 357 } // namespace |
358 | 358 |
359 // static | 359 // static |
360 bool ShellIntegration::CanSetAsDefaultBrowser() { | 360 ShellIntegration::DefaultWebClientSetPermission |
361 return true; | 361 ShellIntegration::CanSetAsDefaultBrowser() { |
| 362 return SET_DEFAULT_UNATTENDED; |
362 } | 363 } |
363 | 364 |
364 // static | 365 // static |
365 bool ShellIntegration::SetAsDefaultBrowser() { | 366 bool ShellIntegration::SetAsDefaultBrowser() { |
366 return SetDefaultWebClient(""); | 367 return SetDefaultWebClient(""); |
367 } | 368 } |
368 | 369 |
369 // static | 370 // static |
370 bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) { | 371 bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) { |
371 return SetDefaultWebClient(protocol); | 372 return SetDefaultWebClient(protocol); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 success = CreateShortcutOnDesktop(shortcut_filename, contents); | 621 success = CreateShortcutOnDesktop(shortcut_filename, contents); |
621 | 622 |
622 if (shortcut_info.create_in_applications_menu) | 623 if (shortcut_info.create_in_applications_menu) |
623 success = CreateShortcutInApplicationsMenu(shortcut_filename, contents) && | 624 success = CreateShortcutInApplicationsMenu(shortcut_filename, contents) && |
624 success; | 625 success; |
625 | 626 |
626 return success; | 627 return success; |
627 } | 628 } |
628 | 629 |
629 } // namespace ShellIntegrationLinux | 630 } // namespace ShellIntegrationLinux |
OLD | NEW |