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

Side by Side Diff: chrome/browser/ui/app_list/keep_alive_service_impl.cc

Issue 176363002: Rename Start/EndKeepAlive to Increment/DecrementKeepAliveCount (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/app_list/keep_alive_service_impl.h" 5 #include "chrome/browser/ui/app_list/keep_alive_service_impl.h"
6 6
7 #include "chrome/browser/lifetime/application_lifetime.h" 7 #include "chrome/browser/lifetime/application_lifetime.h"
8 8
9 ScopedKeepAlive::ScopedKeepAlive() { 9 ScopedKeepAlive::ScopedKeepAlive() { chrome::IncrementKeepAliveCount(); }
10 chrome::StartKeepAlive();
11 }
12 10
13 ScopedKeepAlive::~ScopedKeepAlive() { 11 ScopedKeepAlive::~ScopedKeepAlive() { chrome::DecrementKeepAliveCount(); }
14 chrome::EndKeepAlive();
15 }
16 12
17 KeepAliveServiceImpl::KeepAliveServiceImpl() { 13 KeepAliveServiceImpl::KeepAliveServiceImpl() {
18 } 14 }
19 15
20 KeepAliveServiceImpl::~KeepAliveServiceImpl() { 16 KeepAliveServiceImpl::~KeepAliveServiceImpl() {
21 } 17 }
22 18
23 void KeepAliveServiceImpl::EnsureKeepAlive() { 19 void KeepAliveServiceImpl::EnsureKeepAlive() {
24 if (!keep_alive_) 20 if (!keep_alive_)
25 keep_alive_.reset(new ScopedKeepAlive()); 21 keep_alive_.reset(new ScopedKeepAlive());
26 } 22 }
27 23
28 void KeepAliveServiceImpl::FreeKeepAlive() { 24 void KeepAliveServiceImpl::FreeKeepAlive() {
29 if (keep_alive_) 25 if (keep_alive_)
30 keep_alive_.reset(); 26 keep_alive_.reset();
31 } 27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698