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/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 Loading... |
128 web_app::internals::GetWebAppDataDirectory( | 128 web_app::internals::GetWebAppDataDirectory( |
129 web_app::GetDataDir(data_dir), | 129 web_app::GetDataDir(data_dir), |
130 shortcut_info), | 130 shortcut_info), |
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 24 matching lines...) Expand all Loading... |
172 | 173 |
173 #if defined(TOOLKIT_USES_GTK) | 174 #if defined(TOOLKIT_USES_GTK) |
174 std::string GetWMClassFromAppName(std::string app_name) { | 175 std::string GetWMClassFromAppName(std::string app_name) { |
175 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); | 176 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); |
176 TrimString(app_name, "_", &app_name); | 177 TrimString(app_name, "_", &app_name); |
177 return app_name; | 178 return app_name; |
178 } | 179 } |
179 #endif | 180 #endif |
180 | 181 |
181 } // namespace web_app | 182 } // namespace web_app |
OLD | NEW |