1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_APPLICATION_ID_H_
6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_APPLICATION_ID_H_
10 #include "base/basictypes.h"
15 // The prefix used for all push messaging application ids.
16 extern const char kPushMessagingApplicationIdPrefix
[];
18 // Type used to identify a web app from a Push API perspective.
19 struct PushMessagingApplicationId
{
21 static PushMessagingApplicationId
Parse(const std::string
& id
);
23 PushMessagingApplicationId()
24 : origin(GURL::EmptyGURL()), service_worker_registration_id(-1) {}
25 PushMessagingApplicationId(const GURL
& origin
,
26 int64 service_worker_registration_id
)
28 service_worker_registration_id(service_worker_registration_id
) {}
31 std::string
ToString() const;
34 const int64 service_worker_registration_id
;
39 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_APPLICATION_ID_H_