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

Side by Side Diff: components/gcm_driver/instance_id/instance_id_factory.h

Issue 2847923002: [Chromecast] Add method to CastCdm for the session expiration updating. (Closed)
Patch Set: Add InstanceIDFactory class to help with testing. Created 3 years, 5 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_FACTORY_H_
6 #define COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_FACTORY_H_
7
8 #include <memory>
9 #include <string>
10
11 namespace gcm {
12 class GCMDriver;
13 }
14
15 namespace instance_id {
16
17 class InstanceID;
18
19 class InstanceIDFactory {
20 public:
21 virtual ~InstanceIDFactory() = default;
22
23 // Creates a new instance of InstanceID. The testing code could override this
24 // to provide a mocked instance.
25 // |app_id|: identifies the application that uses the Instance ID.
26 // |handler|: provides the GCM functionality needed to support Instance ID.
27 // Must outlive this class. On Android, this can be null instead.
28 virtual std::unique_ptr<InstanceID> Create(const std::string& app_id,
29 gcm::GCMDriver* gcm_driver) = 0;
30 };
31
32 } // namespace instance_id
33
34 #endif // COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698