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

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: Fix merge errors Created 8 years, 8 months 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
« no previous file with comments | « chrome/browser/net/url_fixer_upper.cc ('k') | chrome/common/content_settings_pattern.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/file_util.h" 8 #include "base/file_util.h"
9 #include "base/i18n/file_util_icu.h" 9 #include "base/i18n/file_util_icu.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 data_dir, 128 data_dir,
129 shortcut_info.extension_id, 129 shortcut_info.extension_id,
130 shortcut_info.url), 130 shortcut_info.url),
131 data_dir, 131 data_dir,
132 shortcut_info)); 132 shortcut_info));
133 } 133 }
134 134
135 bool IsValidUrl(const GURL& url) { 135 bool IsValidUrl(const GURL& url) {
136 static const char* const kValidUrlSchemes[] = { 136 static const char* const kValidUrlSchemes[] = {
137 chrome::kFileScheme, 137 chrome::kFileScheme,
138 chrome::kFileSystemScheme,
138 chrome::kFtpScheme, 139 chrome::kFtpScheme,
139 chrome::kHttpScheme, 140 chrome::kHttpScheme,
140 chrome::kHttpsScheme, 141 chrome::kHttpsScheme,
141 chrome::kExtensionScheme, 142 chrome::kExtensionScheme,
142 }; 143 };
143 144
144 for (size_t i = 0; i < arraysize(kValidUrlSchemes); ++i) { 145 for (size_t i = 0; i < arraysize(kValidUrlSchemes); ++i) {
145 if (url.SchemeIs(kValidUrlSchemes[i])) 146 if (url.SchemeIs(kValidUrlSchemes[i]))
146 return true; 147 return true;
147 } 148 }
(...skipping 20 matching lines...) Expand all
168 169
169 #if defined(TOOLKIT_USES_GTK) 170 #if defined(TOOLKIT_USES_GTK)
170 std::string GetWMClassFromAppName(std::string app_name) { 171 std::string GetWMClassFromAppName(std::string app_name) {
171 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); 172 file_util::ReplaceIllegalCharactersInPath(&app_name, '_');
172 TrimString(app_name, "_", &app_name); 173 TrimString(app_name, "_", &app_name);
173 return app_name; 174 return app_name;
174 } 175 }
175 #endif 176 #endif
176 177
177 } // namespace web_app 178 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/net/url_fixer_upper.cc ('k') | chrome/common/content_settings_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698