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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 } | 989 } |
990 | 990 |
991 if (creation_locations.applications_menu_location == | 991 if (creation_locations.applications_menu_location == |
992 web_app::APP_MENU_LOCATION_NONE) { | 992 web_app::APP_MENU_LOCATION_NONE) { |
993 return success; | 993 return success; |
994 } | 994 } |
995 | 995 |
996 base::FilePath directory_filename; | 996 base::FilePath directory_filename; |
997 std::string directory_contents; | 997 std::string directory_contents; |
998 switch (creation_locations.applications_menu_location) { | 998 switch (creation_locations.applications_menu_location) { |
999 case web_app::APP_MENU_LOCATION_ROOT: | |
1000 case web_app::APP_MENU_LOCATION_HIDDEN: | 999 case web_app::APP_MENU_LOCATION_HIDDEN: |
1001 break; | 1000 break; |
1002 case web_app::APP_MENU_LOCATION_SUBDIR_CHROMEAPPS: | 1001 case web_app::APP_MENU_LOCATION_SUBDIR_CHROMEAPPS: |
1003 directory_filename = base::FilePath(kDirectoryFilename); | 1002 directory_filename = base::FilePath(kDirectoryFilename); |
1004 directory_contents = GetDirectoryFileContents( | 1003 directory_contents = GetDirectoryFileContents( |
1005 shell_integration::GetAppShortcutsSubdirName(), ""); | 1004 shell_integration::GetAppShortcutsSubdirName(), ""); |
1006 break; | 1005 break; |
1007 default: | 1006 default: |
1008 NOTREACHED(); | 1007 NOTREACHED(); |
1009 break; | 1008 break; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 base::FilePath applications_menu = GetDataWriteLocation(env.get()); | 1106 base::FilePath applications_menu = GetDataWriteLocation(env.get()); |
1108 applications_menu = applications_menu.AppendASCII("applications"); | 1107 applications_menu = applications_menu.AppendASCII("applications"); |
1109 std::vector<base::FilePath> shortcut_filenames_app_menu = | 1108 std::vector<base::FilePath> shortcut_filenames_app_menu = |
1110 GetExistingProfileShortcutFilenames(profile_path, applications_menu); | 1109 GetExistingProfileShortcutFilenames(profile_path, applications_menu); |
1111 for (const auto& menu : shortcut_filenames_app_menu) { | 1110 for (const auto& menu : shortcut_filenames_app_menu) { |
1112 DeleteShortcutInApplicationsMenu(menu, base::FilePath(kDirectoryFilename)); | 1111 DeleteShortcutInApplicationsMenu(menu, base::FilePath(kDirectoryFilename)); |
1113 } | 1112 } |
1114 } | 1113 } |
1115 | 1114 |
1116 } // namespace shell_integration_linux | 1115 } // namespace shell_integration_linux |
OLD | NEW |