| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 253 |
| 254 // static | 254 // static |
| 255 void BackgroundModeManager::LaunchBackgroundApplication( | 255 void BackgroundModeManager::LaunchBackgroundApplication( |
| 256 Profile* profile, | 256 Profile* profile, |
| 257 const Extension* extension) { | 257 const Extension* extension) { |
| 258 ExtensionService* service = profile->GetExtensionService(); | 258 ExtensionService* service = profile->GetExtensionService(); |
| 259 extension_misc::LaunchContainer launch_container = | 259 extension_misc::LaunchContainer launch_container = |
| 260 service->extension_prefs()->GetLaunchContainer( | 260 service->extension_prefs()->GetLaunchContainer( |
| 261 extension, ExtensionPrefs::LAUNCH_REGULAR); | 261 extension, ExtensionPrefs::LAUNCH_REGULAR); |
| 262 Browser::OpenApplication(profile, extension, launch_container, GURL(), | 262 Browser::OpenApplication(profile, extension, launch_container, GURL(), |
| 263 NEW_FOREGROUND_TAB); | 263 NEW_FOREGROUND_TAB, NULL); |
| 264 } | 264 } |
| 265 | 265 |
| 266 bool BackgroundModeManager::IsBackgroundModeActiveForTest() { | 266 bool BackgroundModeManager::IsBackgroundModeActiveForTest() { |
| 267 return in_background_mode_; | 267 return in_background_mode_; |
| 268 } | 268 } |
| 269 | 269 |
| 270 int BackgroundModeManager::NumberOfBackgroundModeData() { | 270 int BackgroundModeManager::NumberOfBackgroundModeData() { |
| 271 return background_mode_data_.size(); | 271 return background_mode_data_.size(); |
| 272 } | 272 } |
| 273 | 273 |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 } | 761 } |
| 762 } | 762 } |
| 763 return profile_it; | 763 return profile_it; |
| 764 } | 764 } |
| 765 | 765 |
| 766 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 766 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
| 767 PrefService* service = g_browser_process->local_state(); | 767 PrefService* service = g_browser_process->local_state(); |
| 768 DCHECK(service); | 768 DCHECK(service); |
| 769 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 769 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
| 770 } | 770 } |
| OLD | NEW |