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