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

Unified Diff: chrome/browser/ui/app_list/keep_alive_service_impl.cc

Issue 24707002: Add unit tests for AppListServiceImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: un-const an iterator Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/app_list/keep_alive_service_impl.h ('k') | chrome/browser/ui/app_list/profile_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/keep_alive_service_impl.cc
diff --git a/chrome/browser/ui/app_list/keep_alive_service_impl.cc b/chrome/browser/ui/app_list/keep_alive_service_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a08c843d3d0d772bcf31e5a1953a0b84e52ef486
--- /dev/null
+++ b/chrome/browser/ui/app_list/keep_alive_service_impl.cc
@@ -0,0 +1,31 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/app_list/keep_alive_service_impl.h"
+
+#include "chrome/browser/lifetime/application_lifetime.h"
+
+ScopedKeepAlive::ScopedKeepAlive() {
+ chrome::StartKeepAlive();
+}
+
+ScopedKeepAlive::~ScopedKeepAlive() {
+ chrome::EndKeepAlive();
+}
+
+KeepAliveServiceImpl::KeepAliveServiceImpl() {
+}
+
+KeepAliveServiceImpl::~KeepAliveServiceImpl() {
+}
+
+void KeepAliveServiceImpl::EnsureKeepAlive() {
+ if (!keep_alive_)
+ keep_alive_.reset(new ScopedKeepAlive());
+}
+
+void KeepAliveServiceImpl::FreeKeepAlive() {
+ if (keep_alive_)
+ keep_alive_.reset();
+}
« no previous file with comments | « chrome/browser/ui/app_list/keep_alive_service_impl.h ('k') | chrome/browser/ui/app_list/profile_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698