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

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

Issue 7864031: If --views-desktop is specified from the command line, respect it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" 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
« no previous file with comments | « no previous file | no next file » | 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) 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 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 local_state->RegisterBooleanPref(prefs::kPrintingPrintPreviewEnabledOnce, 1309 local_state->RegisterBooleanPref(prefs::kPrintingPrintPreviewEnabledOnce,
1310 false, 1310 false,
1311 PrefService::UNSYNCABLE_PREF); 1311 PrefService::UNSYNCABLE_PREF);
1312 if (!local_state->GetBoolean(prefs::kPrintingPrintPreviewEnabledOnce)) { 1312 if (!local_state->GetBoolean(prefs::kPrintingPrintPreviewEnabledOnce)) {
1313 local_state->SetBoolean(prefs::kPrintingPrintPreviewEnabledOnce, true); 1313 local_state->SetBoolean(prefs::kPrintingPrintPreviewEnabledOnce, true);
1314 about_flags::SetExperimentEnabled(local_state, "print-preview", true); 1314 about_flags::SetExperimentEnabled(local_state, "print-preview", true);
1315 } 1315 }
1316 #endif 1316 #endif
1317 1317
1318 #if defined(TOUCH_UI) 1318 #if defined(TOUCH_UI)
1319 // Always add the --views-desktop flag. If the user disabled the flag from 1319 // Always add the --views-desktop flag, if not already set.
1320 // about:flags, it will get unset bt the call to ConvertFlagsToSwitches in the 1320 // If the user disabled the flag from about:flags, it will get unset by the
1321 // following line. 1321 // call to ConvertFlagsToSwitches in the following line.
1322 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop, 1322 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop))
1323 "other"); 1323 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop,
1324 "other");
1324 #endif 1325 #endif
1325 1326
1326 // Convert active labs into switches. Modifies the current command line. 1327 // Convert active labs into switches. Modifies the current command line.
1327 about_flags::ConvertFlagsToSwitches(local_state, 1328 about_flags::ConvertFlagsToSwitches(local_state,
1328 CommandLine::ForCurrentProcess()); 1329 CommandLine::ForCurrentProcess());
1329 1330
1330 #if defined(TOOLKIT_VIEWS) 1331 #if defined(TOOLKIT_VIEWS)
1331 views::Widget::SetPureViews( 1332 views::Widget::SetPureViews(
1332 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); 1333 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews));
1333 // Launch the views desktop shell window and register it as the default parent 1334 // Launch the views desktop shell window and register it as the default parent
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2013 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2013 (pre_read == "0" || pre_read == "1")) { 2014 (pre_read == "0" || pre_read == "1")) {
2014 std::string uma_name(name); 2015 std::string uma_name(name);
2015 uma_name += "_PreRead"; 2016 uma_name += "_PreRead";
2016 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2017 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2017 AddPreReadHistogramTime(uma_name.c_str(), time); 2018 AddPreReadHistogramTime(uma_name.c_str(), time);
2018 } 2019 }
2019 #endif 2020 #endif
2020 #endif 2021 #endif
2021 } 2022 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698