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

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

Issue 7850026: Aura under Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: White spaces Created 9 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 | Annotate | Revision Log
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 #include "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 #include "chrome/browser/oom_priority_manager.h" 144 #include "chrome/browser/oom_priority_manager.h"
145 #include "chrome/browser/ui/views/browser_dialogs.h" 145 #include "chrome/browser/ui/views/browser_dialogs.h"
146 #endif 146 #endif
147 147
148 // TODO(port): several win-only methods have been pulled out of this, but 148 // TODO(port): several win-only methods have been pulled out of this, but
149 // BrowserMain() as a whole needs to be broken apart so that it's usable by 149 // BrowserMain() as a whole needs to be broken apart so that it's usable by
150 // other platforms. For now, it's just a stub. This is a serious work in 150 // other platforms. For now, it's just a stub. This is a serious work in
151 // progress and should not be taken as an indication of a real refactoring. 151 // progress and should not be taken as an indication of a real refactoring.
152 152
153 #if defined(OS_WIN) 153 #if defined(OS_WIN)
154
155 #include "base/environment.h" // For PreRead experiment. 154 #include "base/environment.h" // For PreRead experiment.
156 #include "base/win/windows_version.h" 155 #include "base/win/windows_version.h"
157 #include "chrome/browser/browser_trial.h" 156 #include "chrome/browser/browser_trial.h"
158 #include "chrome/browser/browser_util_win.h" 157 #include "chrome/browser/browser_util_win.h"
159 #include "chrome/browser/first_run/try_chrome_dialog_view.h" 158 #include "chrome/browser/first_run/try_chrome_dialog_view.h"
160 #include "chrome/browser/first_run/upgrade_util_win.h" 159 #include "chrome/browser/first_run/upgrade_util_win.h"
161 #include "chrome/browser/net/url_fixer_upper.h" 160 #include "chrome/browser/net/url_fixer_upper.h"
162 #include "chrome/browser/rlz/rlz.h" 161 #include "chrome/browser/rlz/rlz.h"
163 #include "chrome/browser/ui/views/user_data_dir_dialog.h" 162 #include "chrome/browser/ui/views/user_data_dir_dialog.h"
164 #include "chrome/installer/util/helper.h" 163 #include "chrome/installer/util/helper.h"
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 } 1319 }
1321 #endif 1320 #endif
1322 1321
1323 #if defined(TOUCH_UI) 1322 #if defined(TOUCH_UI)
1324 // Always add the --views-desktop flag, if not already set. 1323 // Always add the --views-desktop flag, if not already set.
1325 // If the user disabled the flag from about:flags, it will get unset by the 1324 // If the user disabled the flag from about:flags, it will get unset by the
1326 // call to ConvertFlagsToSwitches in the following line. 1325 // call to ConvertFlagsToSwitches in the following line.
1327 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop)) 1326 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop))
1328 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop, 1327 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop,
1329 "other"); 1328 "other");
1329 #elif defined(USE_AURA) && defined(OS_LINUX)
1330 // Always add the --views-desktop flag, if not already set.
1331 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop))
1332 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kViewsDesktop);
1330 #endif 1333 #endif
1331 1334
1332 // Convert active labs into switches. Modifies the current command line. 1335 // Convert active labs into switches. Modifies the current command line.
1333 about_flags::ConvertFlagsToSwitches(local_state, 1336 about_flags::ConvertFlagsToSwitches(local_state,
1334 CommandLine::ForCurrentProcess()); 1337 CommandLine::ForCurrentProcess());
1335 1338
1336 // Reset the command line in the crash report details, since we may have 1339 // Reset the command line in the crash report details, since we may have
1337 // just changed it to include experiments. 1340 // just changed it to include experiments.
1338 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); 1341 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess());
1339 1342
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
2035 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2038 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2036 (pre_read == "0" || pre_read == "1")) { 2039 (pre_read == "0" || pre_read == "1")) {
2037 std::string uma_name(name); 2040 std::string uma_name(name);
2038 uma_name += "_PreRead"; 2041 uma_name += "_PreRead";
2039 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2042 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2040 AddPreReadHistogramTime(uma_name.c_str(), time); 2043 AddPreReadHistogramTime(uma_name.c_str(), time);
2041 } 2044 }
2042 #endif 2045 #endif
2043 #endif 2046 #endif
2044 } 2047 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698