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/web_applications/web_app.h" | 5 #include "chrome/browser/web_applications/web_app.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/i18n/file_util_icu.h" | 10 #include "base/i18n/file_util_icu.h" |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 GetInfoForApp(app, | 435 GetInfoForApp(app, |
436 profile, | 436 profile, |
437 base::Bind(&UpdateAllShortcutsForShortcutInfo, old_app_title)); | 437 base::Bind(&UpdateAllShortcutsForShortcutInfo, old_app_title)); |
438 } | 438 } |
439 | 439 |
440 bool IsValidUrl(const GURL& url) { | 440 bool IsValidUrl(const GURL& url) { |
441 static const char* const kValidUrlSchemes[] = { | 441 static const char* const kValidUrlSchemes[] = { |
442 content::kFileScheme, | 442 content::kFileScheme, |
443 content::kFileSystemScheme, | 443 content::kFileSystemScheme, |
444 content::kFtpScheme, | 444 content::kFtpScheme, |
445 content::kHttpScheme, | 445 url::kHttpScheme, |
446 content::kHttpsScheme, | 446 url::kHttpsScheme, |
447 extensions::kExtensionScheme, | 447 extensions::kExtensionScheme, |
448 }; | 448 }; |
449 | 449 |
450 for (size_t i = 0; i < arraysize(kValidUrlSchemes); ++i) { | 450 for (size_t i = 0; i < arraysize(kValidUrlSchemes); ++i) { |
451 if (url.SchemeIs(kValidUrlSchemes[i])) | 451 if (url.SchemeIs(kValidUrlSchemes[i])) |
452 return true; | 452 return true; |
453 } | 453 } |
454 | 454 |
455 return false; | 455 return false; |
456 } | 456 } |
(...skipping 17 matching lines...) Expand all Loading... |
474 | 474 |
475 #if defined(OS_LINUX) | 475 #if defined(OS_LINUX) |
476 std::string GetWMClassFromAppName(std::string app_name) { | 476 std::string GetWMClassFromAppName(std::string app_name) { |
477 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); | 477 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); |
478 base::TrimString(app_name, "_", &app_name); | 478 base::TrimString(app_name, "_", &app_name); |
479 return app_name; | 479 return app_name; |
480 } | 480 } |
481 #endif | 481 #endif |
482 | 482 |
483 } // namespace web_app | 483 } // namespace web_app |
OLD | NEW |