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

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

Issue 2528173003: Desktop fast shutdown experiment (Closed)
Patch Set: Address comment Created 4 years 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 | « chrome/browser/chrome_browser_field_trials_desktop.cc ('k') | chrome/browser/features.h » ('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) 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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 #include "ui/base/l10n/l10n_util.h" 169 #include "ui/base/l10n/l10n_util.h"
170 #include "ui/base/layout.h" 170 #include "ui/base/layout.h"
171 #include "ui/base/material_design/material_design_controller.h" 171 #include "ui/base/material_design/material_design_controller.h"
172 #include "ui/base/resource/resource_bundle.h" 172 #include "ui/base/resource/resource_bundle.h"
173 173
174 #if defined(OS_ANDROID) 174 #if defined(OS_ANDROID)
175 #include "chrome/browser/android/offline_pages/offline_page_info_handler.h" 175 #include "chrome/browser/android/offline_pages/offline_page_info_handler.h"
176 #include "chrome/browser/metrics/thread_watcher_android.h" 176 #include "chrome/browser/metrics/thread_watcher_android.h"
177 #include "ui/base/resource/resource_bundle_android.h" 177 #include "ui/base/resource/resource_bundle_android.h"
178 #else 178 #else
179 #include "chrome/browser/features.h"
179 #include "chrome/browser/feedback/feedback_profile_observer.h" 180 #include "chrome/browser/feedback/feedback_profile_observer.h"
181 #include "chrome/browser/lifetime/application_lifetime.h"
180 #endif // defined(OS_ANDROID) 182 #endif // defined(OS_ANDROID)
181 183
182 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 184 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
183 #include "chrome/browser/first_run/upgrade_util_linux.h" 185 #include "chrome/browser/first_run/upgrade_util_linux.h"
184 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) 186 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
185 187
186 #if defined(OS_CHROMEOS) 188 #if defined(OS_CHROMEOS)
187 #include "ash/common/material_design/material_design_controller.h" 189 #include "ash/common/material_design/material_design_controller.h"
188 #include "chrome/browser/chromeos/settings/cros_settings.h" 190 #include "chrome/browser/chromeos/settings/cros_settings.h"
189 #include "chromeos/chromeos_switches.h" 191 #include "chromeos/chromeos_switches.h"
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 DCHECK(base::MessageLoopForUI::IsCurrent()); 1977 DCHECK(base::MessageLoopForUI::IsCurrent());
1976 base::RunLoop run_loop; 1978 base::RunLoop run_loop;
1977 1979
1978 performance_monitor::PerformanceMonitor::GetInstance()->StartGatherCycle(); 1980 performance_monitor::PerformanceMonitor::GetInstance()->StartGatherCycle();
1979 1981
1980 metrics::MetricsService::SetExecutionPhase( 1982 metrics::MetricsService::SetExecutionPhase(
1981 metrics::MetricsService::MAIN_MESSAGE_LOOP_RUN, 1983 metrics::MetricsService::MAIN_MESSAGE_LOOP_RUN,
1982 g_browser_process->local_state()); 1984 g_browser_process->local_state());
1983 run_loop.Run(); 1985 run_loop.Run();
1984 1986
1987 if (base::FeatureList::IsEnabled(chrome::kDesktopFastShutdown))
1988 chrome::SessionEnding();
hashimoto 2016/11/30 10:50:15 How about having a comment which makes it clear th
manzagop (departed) 2016/11/30 14:38:31 Done.
1989
1985 return true; 1990 return true;
1986 #endif // defined(OS_ANDROID) 1991 #endif // defined(OS_ANDROID)
1987 } 1992 }
1988 1993
1989 void ChromeBrowserMainParts::PostMainMessageLoopRun() { 1994 void ChromeBrowserMainParts::PostMainMessageLoopRun() {
1990 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopRun"); 1995 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopRun");
1991 #if defined(OS_ANDROID) 1996 #if defined(OS_ANDROID)
1992 // Chrome on Android does not use default MessageLoop. It has its own 1997 // Chrome on Android does not use default MessageLoop. It has its own
1993 // Android specific MessageLoop 1998 // Android specific MessageLoop
1994 NOTREACHED(); 1999 NOTREACHED();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2093 chromeos::CrosSettings::Shutdown(); 2098 chromeos::CrosSettings::Shutdown();
2094 #endif // defined(OS_CHROMEOS) 2099 #endif // defined(OS_CHROMEOS)
2095 #endif // defined(OS_ANDROID) 2100 #endif // defined(OS_ANDROID)
2096 } 2101 }
2097 2102
2098 // Public members: 2103 // Public members:
2099 2104
2100 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2105 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2101 chrome_extra_parts_.push_back(parts); 2106 chrome_extra_parts_.push_back(parts);
2102 } 2107 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_field_trials_desktop.cc ('k') | chrome/browser/features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698