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

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

Issue 104043010: Cleanup: Move kFileSystemScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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) 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 shortcut_info.profile_path, shortcut_info.extension_id, 187 shortcut_info.profile_path, shortcut_info.extension_id,
188 shortcut_info.url); 188 shortcut_info.url);
189 return internals::CreatePlatformShortcuts(shortcut_data_dir, shortcut_info, 189 return internals::CreatePlatformShortcuts(shortcut_data_dir, shortcut_info,
190 creation_locations, 190 creation_locations,
191 creation_reason); 191 creation_reason);
192 } 192 }
193 193
194 bool IsValidUrl(const GURL& url) { 194 bool IsValidUrl(const GURL& url) {
195 static const char* const kValidUrlSchemes[] = { 195 static const char* const kValidUrlSchemes[] = {
196 chrome::kFileScheme, 196 chrome::kFileScheme,
197 chrome::kFileSystemScheme, 197 content::kFileSystemScheme,
198 content::kFtpScheme, 198 content::kFtpScheme,
199 content::kHttpScheme, 199 content::kHttpScheme,
200 content::kHttpsScheme, 200 content::kHttpsScheme,
201 extensions::kExtensionScheme, 201 extensions::kExtensionScheme,
202 }; 202 };
203 203
204 for (size_t i = 0; i < arraysize(kValidUrlSchemes); ++i) { 204 for (size_t i = 0; i < arraysize(kValidUrlSchemes); ++i) {
205 if (url.SchemeIs(kValidUrlSchemes[i])) 205 if (url.SchemeIs(kValidUrlSchemes[i]))
206 return true; 206 return true;
207 } 207 }
(...skipping 20 matching lines...) Expand all
228 228
229 #if defined(OS_LINUX) 229 #if defined(OS_LINUX)
230 std::string GetWMClassFromAppName(std::string app_name) { 230 std::string GetWMClassFromAppName(std::string app_name) {
231 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); 231 file_util::ReplaceIllegalCharactersInPath(&app_name, '_');
232 base::TrimString(app_name, "_", &app_name); 232 base::TrimString(app_name, "_", &app_name);
233 return app_name; 233 return app_name;
234 } 234 }
235 #endif 235 #endif
236 236
237 } // namespace web_app 237 } // namespace web_app
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698