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

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

Issue 265503003: Enable file_handlers and chrome.app.runtime for QuickOffice. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: With blacklist, test 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/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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 487
488 AppLaunchParams params(profile, extension, launch_container, NEW_WINDOW); 488 AppLaunchParams params(profile, extension, launch_container, NEW_WINDOW);
489 params.command_line = command_line_; 489 params.command_line = command_line_;
490 params.current_directory = cur_dir_; 490 params.current_directory = cur_dir_;
491 WebContents* tab_in_app_window = OpenApplication(params); 491 WebContents* tab_in_app_window = OpenApplication(params);
492 492
493 if (out_app_contents) 493 if (out_app_contents)
494 *out_app_contents = tab_in_app_window; 494 *out_app_contents = tab_in_app_window;
495 495
496 // Platform apps fire off a launch event which may or may not open a window. 496 // Platform apps fire off a launch event which may or may not open a window.
497 return (tab_in_app_window != NULL || extension->is_platform_app()); 497 return (tab_in_app_window != NULL || LaunchesViaEvent(extension));
498 } 498 }
499 499
500 if (url_string.empty()) 500 if (url_string.empty())
501 return false; 501 return false;
502 502
503 #if defined(OS_WIN) // Fix up Windows shortcuts. 503 #if defined(OS_WIN) // Fix up Windows shortcuts.
504 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%"); 504 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%");
505 #endif 505 #endif
506 GURL url(url_string); 506 GURL url(url_string);
507 507
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 // If the first URL is the NTP, replace it with the sync promo. This 934 // If the first URL is the NTP, replace it with the sync promo. This
935 // behavior is desired because completing or skipping the sync promo 935 // behavior is desired because completing or skipping the sync promo
936 // causes a redirect to the NTP. 936 // causes a redirect to the NTP.
937 if (!startup_urls->empty() && IsNewTabURL(profile_, startup_urls->at(0))) 937 if (!startup_urls->empty() && IsNewTabURL(profile_, startup_urls->at(0)))
938 startup_urls->at(0) = sync_promo_url; 938 startup_urls->at(0) = sync_promo_url;
939 else 939 else
940 startup_urls->insert(startup_urls->begin(), sync_promo_url); 940 startup_urls->insert(startup_urls->begin(), sync_promo_url);
941 } 941 }
942 } 942 }
943 } 943 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698