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