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

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

Issue 2287583003: Linux: Remove --wm-user-time-ms command line argument (Closed)
Patch Set: Rename Created 4 years, 3 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.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> // For max(). 9 #include <algorithm> // For max().
10 #include <memory> 10 #include <memory>
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 #endif 95 #endif
96 96
97 #if defined(OS_MACOSX) 97 #if defined(OS_MACOSX)
98 #include "chrome/browser/web_applications/web_app_mac.h" 98 #include "chrome/browser/web_applications/web_app_mac.h"
99 #endif 99 #endif
100 100
101 #if defined(OS_WIN) 101 #if defined(OS_WIN)
102 #include "chrome/browser/metrics/jumplist_metrics_win.h" 102 #include "chrome/browser/metrics/jumplist_metrics_win.h"
103 #endif 103 #endif
104 104
105 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
106 #include "ui/events/platform/x11/x11_event_source.h"
107 #endif
108
109 #if defined(ENABLE_PRINT_PREVIEW) 105 #if defined(ENABLE_PRINT_PREVIEW)
110 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 106 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
111 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" 107 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h"
112 #include "chrome/browser/printing/print_dialog_cloud.h" 108 #include "chrome/browser/printing/print_dialog_cloud.h"
113 #endif 109 #endif
114 110
115 #if defined(ENABLE_APP_LIST) 111 #if defined(ENABLE_APP_LIST)
116 #include "chrome/browser/ui/app_list/app_list_service.h" 112 #include "chrome/browser/ui/app_list/app_list_service.h"
117 #endif 113 #endif
118 114
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 } 692 }
697 693
698 #if defined(OS_WIN) 694 #if defined(OS_WIN)
699 // Log whether this process was a result of an action in the Windows Jumplist. 695 // Log whether this process was a result of an action in the Windows Jumplist.
700 if (command_line.HasSwitch(switches::kWinJumplistAction)) { 696 if (command_line.HasSwitch(switches::kWinJumplistAction)) {
701 jumplist::LogJumplistActionFromSwitchValue( 697 jumplist::LogJumplistActionFromSwitchValue(
702 command_line.GetSwitchValueASCII(switches::kWinJumplistAction)); 698 command_line.GetSwitchValueASCII(switches::kWinJumplistAction));
703 } 699 }
704 #endif // defined(OS_WIN) 700 #endif // defined(OS_WIN)
705 701
706 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
707 // Our request to Activate may be discarded on some linux window
708 // managers unless given a recent timestamp, so update the timestamp if
709 // we were given one.
710 if (command_line.HasSwitch(switches::kWmUserTimeMs)) {
711 uint64_t time;
712 std::string switch_value =
713 command_line.GetSwitchValueASCII(switches::kWmUserTimeMs);
714 if (base::StringToUint64(switch_value, &time) &&
715 ui::X11EventSource::HasInstance()) {
716 ui::X11EventSource::GetInstance()->SetLastSeenServerTime(
717 static_cast<Time>(time));
718 }
719 }
720 #endif
721
722 chrome::startup::IsProcessStartup is_process_startup = process_startup ? 702 chrome::startup::IsProcessStartup is_process_startup = process_startup ?
723 chrome::startup::IS_PROCESS_STARTUP : 703 chrome::startup::IS_PROCESS_STARTUP :
724 chrome::startup::IS_NOT_PROCESS_STARTUP; 704 chrome::startup::IS_NOT_PROCESS_STARTUP;
725 chrome::startup::IsFirstRun is_first_run = first_run::IsChromeFirstRun() ? 705 chrome::startup::IsFirstRun is_first_run = first_run::IsChromeFirstRun() ?
726 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; 706 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN;
727 // |last_opened_profiles| will be empty in the following circumstances: 707 // |last_opened_profiles| will be empty in the following circumstances:
728 // - This is the first launch. |last_used_profile| is the initial profile. 708 // - This is the first launch. |last_used_profile| is the initial profile.
729 // - The user exited the browser by closing all windows for all 709 // - The user exited the browser by closing all windows for all
730 // profiles. |last_used_profile| is the profile which owned the last open 710 // profiles. |last_used_profile| is the profile which owned the last open
731 // window. 711 // window.
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 if (!entry->IsSigninRequired()) { 934 if (!entry->IsSigninRequired()) {
955 Profile* profile = profile_manager->GetProfile(entry->GetPath()); 935 Profile* profile = profile_manager->GetProfile(entry->GetPath());
956 if (profile) 936 if (profile)
957 return profile; 937 return profile;
958 } 938 }
959 } 939 }
960 940
961 return nullptr; 941 return nullptr;
962 } 942 }
963 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 943 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698