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

Unified Diff: services/image_decoder/image_decoder_service.h

Issue 2538833004: image_decoder: Delay shutdown on idle (Closed)
Patch Set: . Created 4 years 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 | « no previous file | services/image_decoder/image_decoder_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/image_decoder/image_decoder_service.h
diff --git a/services/image_decoder/image_decoder_service.h b/services/image_decoder/image_decoder_service.h
index 4babc6d1b94602da11e70c575d4dda59ec044116..643a130ced9dffba23b9299e2ec7ac1432ce9c56 100644
--- a/services/image_decoder/image_decoder_service.h
+++ b/services/image_decoder/image_decoder_service.h
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "services/service_manager/public/cpp/service.h"
#include "services/service_manager/public/cpp/service_context_ref.h"
@@ -29,7 +30,11 @@ class ImageDecoderService : public service_manager::Service {
bool OnStop() override;
private:
+ void MaybeRequestQuitDelayed();
+ void MaybeRequestQuit();
+
std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_;
+ base::WeakPtrFactory<ImageDecoderService> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ImageDecoderService);
};
« no previous file with comments | « no previous file | services/image_decoder/image_decoder_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698