| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 259 |
| 260 // static | 260 // static |
| 261 void BackgroundModeManager::LaunchBackgroundApplication( | 261 void BackgroundModeManager::LaunchBackgroundApplication( |
| 262 Profile* profile, | 262 Profile* profile, |
| 263 const Extension* extension) { | 263 const Extension* extension) { |
| 264 ExtensionService* service = profile->GetExtensionService(); | 264 ExtensionService* service = profile->GetExtensionService(); |
| 265 extension_misc::LaunchContainer launch_container = | 265 extension_misc::LaunchContainer launch_container = |
| 266 service->extension_prefs()->GetLaunchContainer( | 266 service->extension_prefs()->GetLaunchContainer( |
| 267 extension, ExtensionPrefs::LAUNCH_REGULAR); | 267 extension, ExtensionPrefs::LAUNCH_REGULAR); |
| 268 Browser::OpenApplication(profile, extension, launch_container, GURL(), | 268 Browser::OpenApplication(profile, extension, launch_container, GURL(), |
| 269 NEW_FOREGROUND_TAB); | 269 NEW_FOREGROUND_TAB, NULL); |
| 270 } | 270 } |
| 271 | 271 |
| 272 bool BackgroundModeManager::IsBackgroundModeActiveForTest() { | 272 bool BackgroundModeManager::IsBackgroundModeActiveForTest() { |
| 273 return in_background_mode_; | 273 return in_background_mode_; |
| 274 } | 274 } |
| 275 | 275 |
| 276 int BackgroundModeManager::NumberOfBackgroundModeData() { | 276 int BackgroundModeManager::NumberOfBackgroundModeData() { |
| 277 return background_mode_data_.size(); | 277 return background_mode_data_.size(); |
| 278 } | 278 } |
| 279 | 279 |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 } | 767 } |
| 768 } | 768 } |
| 769 return profile_it; | 769 return profile_it; |
| 770 } | 770 } |
| 771 | 771 |
| 772 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 772 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
| 773 PrefService* service = g_browser_process->local_state(); | 773 PrefService* service = g_browser_process->local_state(); |
| 774 DCHECK(service); | 774 DCHECK(service); |
| 775 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 775 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
| 776 } | 776 } |
| OLD | NEW |