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

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

Issue 2692663002: Gut ash::MaterialDesignController, and remove the about:flags entry. (Closed)
Patch Set: yet another rebase 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/test/base/browser_with_test_window_test.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) 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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 g_browser_process->local_state()); 1042 g_browser_process->local_state());
1044 about_flags::ConvertFlagsToSwitches(&flags_storage, 1043 about_flags::ConvertFlagsToSwitches(&flags_storage,
1045 base::CommandLine::ForCurrentProcess(), 1044 base::CommandLine::ForCurrentProcess(),
1046 flags_ui::kAddSentinels); 1045 flags_ui::kAddSentinels);
1047 } 1046 }
1048 #endif // !defined(OS_CHROMEOS) 1047 #endif // !defined(OS_CHROMEOS)
1049 // The MaterialDesignController needs to look at command line flags, which 1048 // The MaterialDesignController needs to look at command line flags, which
1050 // are not available until this point. Now that they are, proceed with 1049 // are not available until this point. Now that they are, proceed with
1051 // initializing the MaterialDesignController. 1050 // initializing the MaterialDesignController.
1052 ui::MaterialDesignController::Initialize(); 1051 ui::MaterialDesignController::Initialize();
1053 #if defined(OS_CHROMEOS)
1054 ash::MaterialDesignController::Initialize();
1055 #endif // !defined(OS_CHROMEOS)
1056 1052
1057 #if defined(OS_WIN) 1053 #if defined(OS_WIN)
1058 // This is needed to enable ETW exporting when requested in about:flags. 1054 // This is needed to enable ETW exporting when requested in about:flags.
1059 // Normally, we enable it in ContentMainRunnerImpl::Initialize when the flag 1055 // Normally, we enable it in ContentMainRunnerImpl::Initialize when the flag
1060 // is present on the command line but flags in about:flags are converted only 1056 // is present on the command line but flags in about:flags are converted only
1061 // after this function runs. Note that this starts exporting later which 1057 // after this function runs. Note that this starts exporting later which
1062 // affects tracing the browser startup. Also, this is only relevant for the 1058 // affects tracing the browser startup. Also, this is only relevant for the
1063 // browser process, as other processes will get all the flags on their command 1059 // browser process, as other processes will get all the flags on their command
1064 // line regardless of the origin (command line or about:flags). 1060 // line regardless of the origin (command line or about:flags).
1065 if (parsed_command_line().HasSwitch(switches::kTraceExportEventsToETW)) 1061 if (parsed_command_line().HasSwitch(switches::kTraceExportEventsToETW))
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 chromeos::CrosSettings::Shutdown(); 2113 chromeos::CrosSettings::Shutdown();
2118 #endif // defined(OS_CHROMEOS) 2114 #endif // defined(OS_CHROMEOS)
2119 #endif // defined(OS_ANDROID) 2115 #endif // defined(OS_ANDROID)
2120 } 2116 }
2121 2117
2122 // Public members: 2118 // Public members:
2123 2119
2124 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2120 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2125 chrome_extra_parts_.push_back(parts); 2121 chrome_extra_parts_.push_back(parts);
2126 } 2122 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/test/base/browser_with_test_window_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698