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 <stddef.h> | 7 #include <stddef.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/base_paths.h" | 13 #include "base/base_paths.h" |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/location.h" | 17 #include "base/location.h" |
18 #include "base/logging.h" | 18 #include "base/logging.h" |
19 #include "base/metrics/histogram.h" | 19 #include "base/metrics/histogram_macros.h" |
20 #include "base/single_thread_task_runner.h" | 20 #include "base/single_thread_task_runner.h" |
21 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
22 #include "base/threading/thread_task_runner_handle.h" | 22 #include "base/threading/thread_task_runner_handle.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "chrome/app/chrome_command_ids.h" | 24 #include "chrome/app/chrome_command_ids.h" |
25 #include "chrome/browser/background/background_application_list_model.h" | 25 #include "chrome/browser/background/background_application_list_model.h" |
26 #include "chrome/browser/background/background_mode_optimizer.h" | 26 #include "chrome/browser/background/background_mode_optimizer.h" |
27 #include "chrome/browser/background/background_trigger.h" | 27 #include "chrome/browser/background/background_trigger.h" |
28 #include "chrome/browser/browser_process.h" | 28 #include "chrome/browser/browser_process.h" |
29 #include "chrome/browser/browser_shutdown.h" | 29 #include "chrome/browser/browser_shutdown.h" |
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 } | 1047 } |
1048 } | 1048 } |
1049 return profile_it; | 1049 return profile_it; |
1050 } | 1050 } |
1051 | 1051 |
1052 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 1052 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
1053 PrefService* service = g_browser_process->local_state(); | 1053 PrefService* service = g_browser_process->local_state(); |
1054 DCHECK(service); | 1054 DCHECK(service); |
1055 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 1055 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
1056 } | 1056 } |
OLD | NEW |