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

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: Merge conflict resolved 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 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 } 1320 }
1322 #endif 1321 #endif
1323 1322
1324 #if defined(TOUCH_UI) 1323 #if defined(TOUCH_UI)
1325 // Always add the --views-desktop flag, if not already set. 1324 // Always add the --views-desktop flag, if not already set.
1326 // If the user disabled the flag from about:flags, it will get unset by the 1325 // If the user disabled the flag from about:flags, it will get unset by the
1327 // call to ConvertFlagsToSwitches in the following line. 1326 // call to ConvertFlagsToSwitches in the following line.
1328 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop)) 1327 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop))
1329 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop, 1328 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop,
1330 "other"); 1329 "other");
1330 #elif defined(USE_AURA) && defined(OS_LINUX)
1331 // Always add the --views-desktop flag, if not already set.
1332 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop))
1333 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kViewsDesktop);
1331 #endif 1334 #endif
1332 1335
1333 // Convert active labs into switches. Modifies the current command line. 1336 // Convert active labs into switches. Modifies the current command line.
1334 about_flags::ConvertFlagsToSwitches(local_state, 1337 about_flags::ConvertFlagsToSwitches(local_state,
1335 CommandLine::ForCurrentProcess()); 1338 CommandLine::ForCurrentProcess());
1336 1339
1337 // Reset the command line in the crash report details, since we may have 1340 // Reset the command line in the crash report details, since we may have
1338 // just changed it to include experiments. 1341 // just changed it to include experiments.
1339 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); 1342 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess());
1340 1343
(...skipping 14 matching lines...) Expand all
1355 else 1358 else
1356 desktop_type = views::desktop::DesktopWindowView::DESKTOP_DEFAULT; 1359 desktop_type = views::desktop::DesktopWindowView::DESKTOP_DEFAULT;
1357 views::desktop::DesktopWindowView::CreateDesktopWindow(desktop_type); 1360 views::desktop::DesktopWindowView::CreateDesktopWindow(desktop_type);
1358 ChromeViewsDelegate* chrome_views_delegate = static_cast 1361 ChromeViewsDelegate* chrome_views_delegate = static_cast
1359 <ChromeViewsDelegate*>(views::ViewsDelegate::views_delegate); 1362 <ChromeViewsDelegate*>(views::ViewsDelegate::views_delegate);
1360 chrome_views_delegate->default_parent_view = 1363 chrome_views_delegate->default_parent_view =
1361 views::desktop::DesktopWindowView::desktop_window_view; 1364 views::desktop::DesktopWindowView::desktop_window_view;
1362 } 1365 }
1363 } 1366 }
1364 #endif 1367 #endif
1365 #if defined(USE_AURA) 1368 #if defined(USE_AURA) && defined(OS_WIN)
1366 browser::InitAuraDesktop(); 1369 browser::InitAuraDesktop();
1367 #endif 1370 #endif
1368 1371
1369 InitializeNetworkOptions(parsed_command_line()); 1372 InitializeNetworkOptions(parsed_command_line());
1370 InitializeURLRequestThrottlerManager(browser_process_->net_log()); 1373 InitializeURLRequestThrottlerManager(browser_process_->net_log());
1371 1374
1372 // Initialize histogram synchronizer system. This is a singleton and is used 1375 // Initialize histogram synchronizer system. This is a singleton and is used
1373 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of 1376 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of
1374 // scope. Even though NewRunnableMethod does AddRef and Release, the object 1377 // scope. Even though NewRunnableMethod does AddRef and Release, the object
1375 // will not be deleted after the Task is executed. 1378 // will not be deleted after the Task is executed.
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2041 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2039 (pre_read == "0" || pre_read == "1")) { 2042 (pre_read == "0" || pre_read == "1")) {
2040 std::string uma_name(name); 2043 std::string uma_name(name);
2041 uma_name += "_PreRead"; 2044 uma_name += "_PreRead";
2042 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2045 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2043 AddPreReadHistogramTime(uma_name.c_str(), time); 2046 AddPreReadHistogramTime(uma_name.c_str(), time);
2044 } 2047 }
2045 #endif 2048 #endif
2046 #endif 2049 #endif
2047 } 2050 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698