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

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

Issue 254763005: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve a merge conflict. Created 6 years, 7 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
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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698