| OLD | NEW |
| 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/background/background_mode_manager.h" | 5 #include "chrome/browser/background/background_mode_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "grit/chrome_unscaled_resources.h" | 60 #include "grit/chrome_unscaled_resources.h" |
| 61 #include "ui/base/l10n/l10n_util.h" | 61 #include "ui/base/l10n/l10n_util.h" |
| 62 #include "ui/base/resource/resource_bundle.h" | 62 #include "ui/base/resource/resource_bundle.h" |
| 63 | 63 |
| 64 #if defined(OS_WIN) | 64 #if defined(OS_WIN) |
| 65 #include "components/browser_watcher/exit_funnel_win.h" | 65 #include "components/browser_watcher/exit_funnel_win.h" |
| 66 #endif | 66 #endif |
| 67 | 67 |
| 68 using base::UserMetricsAction; | 68 using base::UserMetricsAction; |
| 69 using extensions::Extension; | 69 using extensions::Extension; |
| 70 using extensions::UpdatedExtensionPermissionsInfo; | |
| 71 | 70 |
| 72 namespace { | 71 namespace { |
| 73 | 72 |
| 74 // Records histogram about which auto-launch pattern (if any) was used to launch | 73 // Records histogram about which auto-launch pattern (if any) was used to launch |
| 75 // the current process based on |command_line|. | 74 // the current process based on |command_line|. |
| 76 void RecordAutoLaunchState(const base::CommandLine& command_line) { | 75 void RecordAutoLaunchState(const base::CommandLine& command_line) { |
| 77 enum AutoLaunchState { | 76 enum AutoLaunchState { |
| 78 AUTO_LAUNCH_NONE = 0, | 77 AUTO_LAUNCH_NONE = 0, |
| 79 AUTO_LAUNCH_BACKGROUND = 1, | 78 AUTO_LAUNCH_BACKGROUND = 1, |
| 80 AUTO_LAUNCH_FOREGROUND = 2, | 79 AUTO_LAUNCH_FOREGROUND = 2, |
| (...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 } | 1043 } |
| 1045 } | 1044 } |
| 1046 return profile_it; | 1045 return profile_it; |
| 1047 } | 1046 } |
| 1048 | 1047 |
| 1049 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 1048 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
| 1050 PrefService* service = g_browser_process->local_state(); | 1049 PrefService* service = g_browser_process->local_state(); |
| 1051 DCHECK(service); | 1050 DCHECK(service); |
| 1052 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 1051 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
| 1053 } | 1052 } |
| OLD | NEW |