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

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 8093016: Show sync promo at startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build error Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_utils.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import "chrome/browser/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
11 #include "base/mac/mac_util.h" 11 #include "base/mac/mac_util.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/string_number_conversions.h" 13 #include "base/string_number_conversions.h"
14 #include "base/sys_string_conversions.h" 14 #include "base/sys_string_conversions.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "chrome/app/chrome_command_ids.h" 16 #include "chrome/app/chrome_command_ids.h"
17 #include "chrome/browser/background/background_application_list_model.h" 17 #include "chrome/browser/background/background_application_list_model.h"
18 #include "chrome/browser/background/background_mode_manager.h" 18 #include "chrome/browser/background/background_mode_manager.h"
19 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/browser_shutdown.h" 20 #include "chrome/browser/browser_shutdown.h"
21 #include "chrome/browser/command_updater.h" 21 #include "chrome/browser/command_updater.h"
22 #include "chrome/browser/first_run/first_run.h"
22 #include "chrome/browser/instant/instant_confirm_dialog.h" 23 #include "chrome/browser/instant/instant_confirm_dialog.h"
23 #include "chrome/browser/prefs/pref_service.h" 24 #include "chrome/browser/prefs/pref_service.h"
24 #include "chrome/browser/printing/cloud_print/virtual_driver_install_helper.h" 25 #include "chrome/browser/printing/cloud_print/virtual_driver_install_helper.h"
25 #include "chrome/browser/printing/print_dialog_cloud.h" 26 #include "chrome/browser/printing/print_dialog_cloud.h"
26 #include "chrome/browser/printing/print_job_manager.h" 27 #include "chrome/browser/printing/print_job_manager.h"
27 #include "chrome/browser/profiles/profile_manager.h" 28 #include "chrome/browser/profiles/profile_manager.h"
28 #include "chrome/browser/service/service_process_control.h" 29 #include "chrome/browser/service/service_process_control.h"
29 #include "chrome/browser/sessions/session_service.h" 30 #include "chrome/browser/sessions/session_service.h"
30 #include "chrome/browser/sessions/session_service_factory.h" 31 #include "chrome/browser/sessions/session_service_factory.h"
31 #include "chrome/browser/sessions/tab_restore_service.h" 32 #include "chrome/browser/sessions/tab_restore_service.h"
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 } 1060 }
1060 1061
1061 Browser* browser = BrowserList::GetLastActive(); 1062 Browser* browser = BrowserList::GetLastActive();
1062 // if no browser window exists then create one with no tabs to be filled in 1063 // if no browser window exists then create one with no tabs to be filled in
1063 if (!browser) { 1064 if (!browser) {
1064 browser = Browser::Create([self lastProfile]); 1065 browser = Browser::Create([self lastProfile]);
1065 browser->window()->Show(); 1066 browser->window()->Show();
1066 } 1067 }
1067 1068
1068 CommandLine dummy(CommandLine::NO_PROGRAM); 1069 CommandLine dummy(CommandLine::NO_PROGRAM);
1069 BrowserInit::LaunchWithProfile launch(FilePath(), dummy); 1070 BrowserInit::IsFirstRun first_run = FirstRun::IsChromeFirstRun() ?
1071 BrowserInit::IS_FIRST_RUN : BrowserInit::IS_NOT_FIRST_RUN;
1072 BrowserInit::LaunchWithProfile launch(FilePath(), dummy, first_run);
1070 launch.OpenURLsInBrowser(browser, false, urls); 1073 launch.OpenURLsInBrowser(browser, false, urls);
1071 } 1074 }
1072 1075
1073 - (void)getUrl:(NSAppleEventDescriptor*)event 1076 - (void)getUrl:(NSAppleEventDescriptor*)event
1074 withReply:(NSAppleEventDescriptor*)reply { 1077 withReply:(NSAppleEventDescriptor*)reply {
1075 NSString* urlStr = [[event paramDescriptorForKeyword:keyDirectObject] 1078 NSString* urlStr = [[event paramDescriptorForKeyword:keyDirectObject]
1076 stringValue]; 1079 stringValue];
1077 1080
1078 GURL gurl(base::SysNSStringToUTF8(urlStr)); 1081 GURL gurl(base::SysNSStringToUTF8(urlStr));
1079 std::vector<GURL> gurlVector; 1082 std::vector<GURL> gurlVector;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 1278
1276 } // namespace browser 1279 } // namespace browser
1277 1280
1278 namespace app_controller_mac { 1281 namespace app_controller_mac {
1279 1282
1280 bool IsOpeningNewWindow() { 1283 bool IsOpeningNewWindow() {
1281 return g_is_opening_new_window; 1284 return g_is_opening_new_window;
1282 } 1285 }
1283 1286
1284 } // namespace app_controller_mac 1287 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698