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

Side by Side Diff: trunk/src/chrome/browser/chrome_browser_main_linux.cc

Issue 13590004: Revert 192504 "Re-apply 192420: Move login switches to src/chromeos" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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) 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_linux.h" 5 #include "chrome/browser/chrome_browser_main_linux.h"
6 6
7 #if !defined(OS_CHROMEOS) 7 #if !defined(OS_CHROMEOS)
8 #include "chrome/browser/storage_monitor/storage_monitor_linux.h" 8 #include "chrome/browser/storage_monitor/storage_monitor_linux.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #endif 10 #endif
11 11
12 #if defined(USE_LINUX_BREAKPAD) 12 #if defined(USE_LINUX_BREAKPAD)
13 #include <stdlib.h> 13 #include <stdlib.h>
14 14
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/linux_util.h" 16 #include "base/linux_util.h"
17 #include "base/prefs/pref_service.h" 17 #include "base/prefs/pref_service.h"
18 #include "chrome/app/breakpad_linux.h" 18 #include "chrome/app/breakpad_linux.h"
19 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/env_vars.h" 20 #include "chrome/common/env_vars.h"
21 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
22 22
23 #if defined(OS_CHROMEOS) 23 #if defined(OS_CHROMEOS)
24 #include "chrome/browser/chromeos/settings/cros_settings.h" 24 #include "chrome/browser/chromeos/settings/cros_settings.h"
25 #include "chrome/browser/chromeos/settings/cros_settings_names.h" 25 #include "chrome/browser/chromeos/settings/cros_settings_names.h"
26 #include "chrome/common/chrome_version_info.h" 26 #include "chrome/common/chrome_version_info.h"
27 #include "chromeos/chromeos_switches.h"
28 #endif 27 #endif
29 28
30 #endif // defined(USE_LINUX_BREAKPAD) 29 #endif // defined(USE_LINUX_BREAKPAD)
31 30
32 namespace { 31 namespace {
33 32
34 #if defined(USE_LINUX_BREAKPAD) 33 #if defined(USE_LINUX_BREAKPAD)
35 #if !defined(OS_CHROMEOS) 34 #if !defined(OS_CHROMEOS)
36 void GetLinuxDistroCallback() { 35 void GetLinuxDistroCallback() {
37 base::GetLinuxDistro(); // Initialize base::linux_distro if needed. 36 base::GetLinuxDistro(); // Initialize base::linux_distro if needed.
(...skipping 16 matching lines...) Expand all
54 bool is_chrome_build = true; 53 bool is_chrome_build = true;
55 #else 54 #else
56 bool is_chrome_build = false; 55 bool is_chrome_build = false;
57 #endif 56 #endif
58 57
59 // Check these settings in Chrome builds only, to reduce the chance 58 // Check these settings in Chrome builds only, to reduce the chance
60 // that we accidentally upload crash dumps from Chromium builds. 59 // that we accidentally upload crash dumps from Chromium builds.
61 bool breakpad_enabled = false; 60 bool breakpad_enabled = false;
62 if (is_chrome_build) { 61 if (is_chrome_build) {
63 #if defined(OS_CHROMEOS) 62 #if defined(OS_CHROMEOS)
64 bool is_guest_session = CommandLine::ForCurrentProcess()->HasSwitch( 63 bool is_guest_session =
65 chromeos::switches::kGuestSession); 64 CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession);
66 bool is_stable_channel = 65 bool is_stable_channel =
67 chrome::VersionInfo::GetChannel() == 66 chrome::VersionInfo::GetChannel() ==
68 chrome::VersionInfo::CHANNEL_STABLE; 67 chrome::VersionInfo::CHANNEL_STABLE;
69 // TODO(pastarmovj): Consider the TrustedGet here. 68 // TODO(pastarmovj): Consider the TrustedGet here.
70 bool reporting_enabled; 69 bool reporting_enabled;
71 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, 70 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref,
72 &reporting_enabled); 71 &reporting_enabled);
73 breakpad_enabled = 72 breakpad_enabled =
74 !(is_guest_session && is_stable_channel) && reporting_enabled; 73 !(is_guest_session && is_stable_channel) && reporting_enabled;
75 #else 74 #else
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() { 143 void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() {
145 #if !defined(OS_CHROMEOS) 144 #if !defined(OS_CHROMEOS)
146 // Delete it now. Otherwise the FILE thread would be gone when we try to 145 // Delete it now. Otherwise the FILE thread would be gone when we try to
147 // release it in the dtor and Valgrind would report a leak on almost every 146 // release it in the dtor and Valgrind would report a leak on almost every
148 // single browser_test. 147 // single browser_test.
149 storage_monitor_.reset(); 148 storage_monitor_.reset();
150 #endif 149 #endif
151 150
152 ChromeBrowserMainPartsPosix::PostMainMessageLoopRun(); 151 ChromeBrowserMainPartsPosix::PostMainMessageLoopRun();
153 } 152 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/chrome_browser_main.cc ('k') | trunk/src/chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698