Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: chrome/browser/web_applications/web_app.cc

Issue 7811006: Add full support for filesystem URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better content_settings_pattern.cc changes. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698