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

Side by Side Diff: chrome/browser/browser_init.cc

Issue 3522015: Implement new strategy for default apps (Closed)
Patch Set: all done Created 10 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/browser_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser_init.h" 5 #include "chrome/browser/browser_init.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 return true; 566 return true;
567 } 567 }
568 568
569 bool BrowserInit::LaunchWithProfile::IsAppLaunch(std::string* app_url, 569 bool BrowserInit::LaunchWithProfile::IsAppLaunch(std::string* app_url,
570 std::string* app_id) { 570 std::string* app_id) {
571 if (command_line_.HasSwitch(switches::kApp)) { 571 if (command_line_.HasSwitch(switches::kApp)) {
572 if (app_url) 572 if (app_url)
573 *app_url = command_line_.GetSwitchValueASCII(switches::kApp); 573 *app_url = command_line_.GetSwitchValueASCII(switches::kApp);
574 return true; 574 return true;
575 } 575 }
576 if (!command_line_.HasSwitch(switches::kDisableApps) && 576 if (command_line_.HasSwitch(switches::kAppId)) {
577 command_line_.HasSwitch(switches::kAppId)) {
578 if (app_id) 577 if (app_id)
579 *app_id = command_line_.GetSwitchValueASCII(switches::kAppId); 578 *app_id = command_line_.GetSwitchValueASCII(switches::kAppId);
580 return true; 579 return true;
581 } 580 }
582 return false; 581 return false;
583 } 582 }
584 583
585 bool BrowserInit::LaunchWithProfile::OpenApplicationWindow(Profile* profile) { 584 bool BrowserInit::LaunchWithProfile::OpenApplicationWindow(Profile* profile) {
586 std::string url_string, app_id; 585 std::string url_string, app_id;
587 if (!IsAppLaunch(&url_string, &app_id)) 586 if (!IsAppLaunch(&url_string, &app_id))
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 scoped_refptr<AutomationProviderClass> automation = 1006 scoped_refptr<AutomationProviderClass> automation =
1008 new AutomationProviderClass(profile); 1007 new AutomationProviderClass(profile);
1009 automation->ConnectToChannel(channel_id); 1008 automation->ConnectToChannel(channel_id);
1010 automation->SetExpectedTabCount(expected_tabs); 1009 automation->SetExpectedTabCount(expected_tabs);
1011 1010
1012 AutomationProviderList* list = 1011 AutomationProviderList* list =
1013 g_browser_process->InitAutomationProviderList(); 1012 g_browser_process->InitAutomationProviderList();
1014 DCHECK(list); 1013 DCHECK(list);
1015 list->AddProvider(automation); 1014 list->AddProvider(automation);
1016 } 1015 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698