Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: chrome/browser/background/background_mode_manager.cc

Issue 25414005: Clear session-only data when all browser windows are closed. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
255 UpdateStatusTrayIconContextMenu(); 255 UpdateStatusTrayIconContextMenu();
256 } 256 }
257 257
258 // static 258 // static
259 void BackgroundModeManager::LaunchBackgroundApplication( 259 void BackgroundModeManager::LaunchBackgroundApplication(
260 Profile* profile, 260 Profile* profile,
261 const Extension* extension) { 261 const Extension* extension) {
262 OpenApplication(AppLaunchParams(profile, extension, NEW_FOREGROUND_TAB)); 262 OpenApplication(AppLaunchParams(profile, extension, NEW_FOREGROUND_TAB));
263 } 263 }
264 264
265 bool BackgroundModeManager::IsBackgroundModeActiveForTest() { 265 bool BackgroundModeManager::IsBackgroundModeActive() {
266 return in_background_mode_; 266 return in_background_mode_;
267 } 267 }
268 268
269 int BackgroundModeManager::NumberOfBackgroundModeData() { 269 int BackgroundModeManager::NumberOfBackgroundModeData() {
270 return background_mode_data_.size(); 270 return background_mode_data_.size();
271 } 271 }
272 272
273 /////////////////////////////////////////////////////////////////////////////// 273 ///////////////////////////////////////////////////////////////////////////////
274 // BackgroundModeManager, content::NotificationObserver overrides 274 // BackgroundModeManager, content::NotificationObserver overrides
275 void BackgroundModeManager::Observe( 275 void BackgroundModeManager::Observe(
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 } 749 }
750 } 750 }
751 return profile_it; 751 return profile_it;
752 } 752 }
753 753
754 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { 754 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const {
755 PrefService* service = g_browser_process->local_state(); 755 PrefService* service = g_browser_process->local_state();
756 DCHECK(service); 756 DCHECK(service);
757 return service->GetBoolean(prefs::kBackgroundModeEnabled); 757 return service->GetBoolean(prefs::kBackgroundModeEnabled);
758 } 758 }
OLDNEW
« no previous file with comments | « chrome/browser/background/background_mode_manager.h ('k') | chrome/browser/extensions/app_background_page_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698