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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 1200393002: Add more string_util functions to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string
Patch Set: Android Created 5 years, 6 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/ui/startup/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "apps/app_restore_service.h" 10 #include "apps/app_restore_service.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 *out_app_contents = tab_in_app_window; 483 *out_app_contents = tab_in_app_window;
484 484
485 // Platform apps fire off a launch event which may or may not open a window. 485 // Platform apps fire off a launch event which may or may not open a window.
486 return (tab_in_app_window != NULL || CanLaunchViaEvent(extension)); 486 return (tab_in_app_window != NULL || CanLaunchViaEvent(extension));
487 } 487 }
488 488
489 if (url_string.empty()) 489 if (url_string.empty())
490 return false; 490 return false;
491 491
492 #if defined(OS_WIN) // Fix up Windows shortcuts. 492 #if defined(OS_WIN) // Fix up Windows shortcuts.
493 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%"); 493 base::ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%");
494 #endif 494 #endif
495 GURL url(url_string); 495 GURL url(url_string);
496 496
497 // Restrict allowed URLs for --app switch. 497 // Restrict allowed URLs for --app switch.
498 if (!url.is_empty() && url.is_valid()) { 498 if (!url.is_empty() && url.is_valid()) {
499 ChildProcessSecurityPolicy* policy = 499 ChildProcessSecurityPolicy* policy =
500 ChildProcessSecurityPolicy::GetInstance(); 500 ChildProcessSecurityPolicy::GetInstance();
501 if (policy->IsWebSafeScheme(url.scheme()) || 501 if (policy->IsWebSafeScheme(url.scheme()) ||
502 url.SchemeIs(url::kFileScheme)) { 502 url.SchemeIs(url::kFileScheme)) {
503 const extensions::Extension* extension = 503 const extensions::Extension* extension =
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 // behavior is desired because completing or skipping the sync promo 910 // behavior is desired because completing or skipping the sync promo
911 // causes a redirect to the NTP. 911 // causes a redirect to the NTP.
912 if (!startup_urls->empty() && 912 if (!startup_urls->empty() &&
913 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL)) 913 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL))
914 startup_urls->at(0) = sync_promo_url; 914 startup_urls->at(0) = sync_promo_url;
915 else 915 else
916 startup_urls->insert(startup_urls->begin(), sync_promo_url); 916 startup_urls->insert(startup_urls->begin(), sync_promo_url);
917 } 917 }
918 } 918 }
919 } 919 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/pdf/adobe_reader_info_win.cc ('k') | chrome/browser/ui/webui/chromeos/login/network_dropdown.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698