OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/web_applications/web_app.h" | 5 #include "chrome/browser/web_applications/web_app.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <shlobj.h> | 8 #include <shlobj.h> |
9 #endif // defined(OS_WIN) | 9 #endif // defined(OS_WIN) |
10 | 10 |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 shortcut_info)); | 429 shortcut_info)); |
430 } | 430 } |
431 | 431 |
432 void SetDisableShortcutCreationForTests(bool disable) { | 432 void SetDisableShortcutCreationForTests(bool disable) { |
433 disable_shortcut_creation_for_tests = disable; | 433 disable_shortcut_creation_for_tests = disable; |
434 } | 434 } |
435 | 435 |
436 bool IsValidUrl(const GURL& url) { | 436 bool IsValidUrl(const GURL& url) { |
437 static const char* const kValidUrlSchemes[] = { | 437 static const char* const kValidUrlSchemes[] = { |
438 chrome::kFileScheme, | 438 chrome::kFileScheme, |
| 439 chrome::kFileSystemScheme, |
439 chrome::kFtpScheme, | 440 chrome::kFtpScheme, |
440 chrome::kHttpScheme, | 441 chrome::kHttpScheme, |
441 chrome::kHttpsScheme, | 442 chrome::kHttpsScheme, |
442 chrome::kExtensionScheme, | 443 chrome::kExtensionScheme, |
443 }; | 444 }; |
444 | 445 |
445 for (size_t i = 0; i < arraysize(kValidUrlSchemes); ++i) { | 446 for (size_t i = 0; i < arraysize(kValidUrlSchemes); ++i) { |
446 if (url.SchemeIs(kValidUrlSchemes[i])) | 447 if (url.SchemeIs(kValidUrlSchemes[i])) |
447 return true; | 448 return true; |
448 } | 449 } |
(...skipping 24 matching lines...) Expand all Loading... |
473 | 474 |
474 #if defined(TOOLKIT_USES_GTK) | 475 #if defined(TOOLKIT_USES_GTK) |
475 std::string GetWMClassFromAppName(std::string app_name) { | 476 std::string GetWMClassFromAppName(std::string app_name) { |
476 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); | 477 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); |
477 TrimString(app_name, "_", &app_name); | 478 TrimString(app_name, "_", &app_name); |
478 return app_name; | 479 return app_name; |
479 } | 480 } |
480 #endif | 481 #endif |
481 | 482 |
482 } // namespace web_app | 483 } // namespace web_app |
OLD | NEW |