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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 // static | 196 // static |
197 bool BackgroundModeManager::BackgroundModeData::BackgroundModeDataCompare( | 197 bool BackgroundModeManager::BackgroundModeData::BackgroundModeDataCompare( |
198 const BackgroundModeData* bmd1, | 198 const BackgroundModeData* bmd1, |
199 const BackgroundModeData* bmd2) { | 199 const BackgroundModeData* bmd2) { |
200 return bmd1->name_ < bmd2->name_; | 200 return bmd1->name_ < bmd2->name_; |
201 } | 201 } |
202 | 202 |
203 | 203 |
204 /////////////////////////////////////////////////////////////////////////////// | 204 /////////////////////////////////////////////////////////////////////////////// |
205 // BackgroundModeManager, public | 205 // BackgroundModeManager, public |
206 BackgroundModeManager::BackgroundModeManager( | 206 BackgroundModeManager::BackgroundModeManager(base::CommandLine* command_line, |
207 CommandLine* command_line, | 207 ProfileInfoCache* profile_cache) |
208 ProfileInfoCache* profile_cache) | |
209 : profile_cache_(profile_cache), | 208 : profile_cache_(profile_cache), |
210 status_tray_(NULL), | 209 status_tray_(NULL), |
211 status_icon_(NULL), | 210 status_icon_(NULL), |
212 context_menu_(NULL), | 211 context_menu_(NULL), |
213 in_background_mode_(false), | 212 in_background_mode_(false), |
214 keep_alive_for_startup_(false), | 213 keep_alive_for_startup_(false), |
215 keep_alive_for_test_(false), | 214 keep_alive_for_test_(false), |
216 background_mode_suspended_(false), | 215 background_mode_suspended_(false), |
217 keeping_alive_(false) { | 216 keeping_alive_(false) { |
218 // We should never start up if there is no browser process or if we are | 217 // We should never start up if there is no browser process or if we are |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 } | 857 } |
859 } | 858 } |
860 return profile_it; | 859 return profile_it; |
861 } | 860 } |
862 | 861 |
863 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 862 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
864 PrefService* service = g_browser_process->local_state(); | 863 PrefService* service = g_browser_process->local_state(); |
865 DCHECK(service); | 864 DCHECK(service); |
866 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 865 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
867 } | 866 } |
OLD | NEW |