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

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

Issue 2692663002: Gut ash::MaterialDesignController, and remove the about:flags entry. (Closed)
Patch Set: terry review Created 3 years, 10 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/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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 #include "chrome/browser/features.h" 179 #include "chrome/browser/features.h"
180 #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" 181 #include "chrome/browser/lifetime/application_lifetime.h"
182 #endif // defined(OS_ANDROID) 182 #endif // defined(OS_ANDROID)
183 183
184 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 184 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
185 #include "chrome/browser/first_run/upgrade_util_linux.h" 185 #include "chrome/browser/first_run/upgrade_util_linux.h"
186 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) 186 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
187 187
188 #if defined(OS_CHROMEOS) 188 #if defined(OS_CHROMEOS)
189 #include "ash/common/material_design/material_design_controller.h"
190 #include "chrome/browser/chromeos/settings/cros_settings.h" 189 #include "chrome/browser/chromeos/settings/cros_settings.h"
191 #include "chromeos/chromeos_switches.h" 190 #include "chromeos/chromeos_switches.h"
192 #include "chromeos/settings/cros_settings_names.h" 191 #include "chromeos/settings/cros_settings_names.h"
193 #endif // defined(OS_CHROMEOS) 192 #endif // defined(OS_CHROMEOS)
194 193
195 // TODO(port): several win-only methods have been pulled out of this, but 194 // TODO(port): several win-only methods have been pulled out of this, but
196 // BrowserMain() as a whole needs to be broken apart so that it's usable by 195 // BrowserMain() as a whole needs to be broken apart so that it's usable by
197 // other platforms. For now, it's just a stub. This is a serious work in 196 // other platforms. For now, it's just a stub. This is a serious work in
198 // progress and should not be taken as an indication of a real refactoring. 197 // progress and should not be taken as an indication of a real refactoring.
199 198
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 g_browser_process->local_state()); 1047 g_browser_process->local_state());
1049 about_flags::ConvertFlagsToSwitches(&flags_storage, 1048 about_flags::ConvertFlagsToSwitches(&flags_storage,
1050 base::CommandLine::ForCurrentProcess(), 1049 base::CommandLine::ForCurrentProcess(),
1051 flags_ui::kAddSentinels); 1050 flags_ui::kAddSentinels);
1052 } 1051 }
1053 #endif // !defined(OS_CHROMEOS) 1052 #endif // !defined(OS_CHROMEOS)
1054 // The MaterialDesignController needs to look at command line flags, which 1053 // The MaterialDesignController needs to look at command line flags, which
1055 // are not available until this point. Now that they are, proceed with 1054 // are not available until this point. Now that they are, proceed with
1056 // initializing the MaterialDesignController. 1055 // initializing the MaterialDesignController.
1057 ui::MaterialDesignController::Initialize(); 1056 ui::MaterialDesignController::Initialize();
1058 #if defined(OS_CHROMEOS)
1059 ash::MaterialDesignController::Initialize();
1060 #endif // !defined(OS_CHROMEOS)
1061 1057
1062 #if defined(OS_WIN) 1058 #if defined(OS_WIN)
1063 // This is needed to enable ETW exporting when requested in about:flags. 1059 // This is needed to enable ETW exporting when requested in about:flags.
1064 // Normally, we enable it in ContentMainRunnerImpl::Initialize when the flag 1060 // Normally, we enable it in ContentMainRunnerImpl::Initialize when the flag
1065 // is present on the command line but flags in about:flags are converted only 1061 // is present on the command line but flags in about:flags are converted only
1066 // after this function runs. Note that this starts exporting later which 1062 // after this function runs. Note that this starts exporting later which
1067 // affects tracing the browser startup. Also, this is only relevant for the 1063 // affects tracing the browser startup. Also, this is only relevant for the
1068 // browser process, as other processes will get all the flags on their command 1064 // browser process, as other processes will get all the flags on their command
1069 // line regardless of the origin (command line or about:flags). 1065 // line regardless of the origin (command line or about:flags).
1070 if (parsed_command_line().HasSwitch(switches::kTraceExportEventsToETW)) 1066 if (parsed_command_line().HasSwitch(switches::kTraceExportEventsToETW))
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 chromeos::CrosSettings::Shutdown(); 2118 chromeos::CrosSettings::Shutdown();
2123 #endif // defined(OS_CHROMEOS) 2119 #endif // defined(OS_CHROMEOS)
2124 #endif // defined(OS_ANDROID) 2120 #endif // defined(OS_ANDROID)
2125 } 2121 }
2126 2122
2127 // Public members: 2123 // Public members:
2128 2124
2129 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2125 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2130 chrome_extra_parts_.push_back(parts); 2126 chrome_extra_parts_.push_back(parts);
2131 } 2127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698