OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/services/gcm/push_messaging_service_impl.h" | 5 #include "chrome/browser/services/gcm/push_messaging_service_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "chrome/browser/content_settings/permission_request_id.h" | |
14 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/services/gcm/gcm_profile_service.h" | 14 #include "chrome/browser/services/gcm/gcm_profile_service.h" |
16 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" | 15 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" |
17 #include "chrome/browser/services/gcm/push_messaging_application_id.h" | 16 #include "chrome/browser/services/gcm/push_messaging_application_id.h" |
18 #include "chrome/browser/services/gcm/push_messaging_permission_context.h" | 17 #include "chrome/browser/services/gcm/push_messaging_permission_context.h" |
19 #include "chrome/browser/services/gcm/push_messaging_permission_context_factory.
h" | 18 #include "chrome/browser/services/gcm/push_messaging_permission_context_factory.
h" |
20 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
21 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 21 #include "components/content_settings/core/common/permission_request_id.h" |
22 #include "components/gcm_driver/gcm_driver.h" | 22 #include "components/gcm_driver/gcm_driver.h" |
23 #include "components/pref_registry/pref_registry_syncable.h" | 23 #include "components/pref_registry/pref_registry_syncable.h" |
24 #include "content/public/browser/browser_context.h" | 24 #include "content/public/browser/browser_context.h" |
25 #include "content/public/browser/render_frame_host.h" | 25 #include "content/public/browser/render_frame_host.h" |
26 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
27 | 27 |
28 namespace gcm { | 28 namespace gcm { |
29 | 29 |
30 namespace { | 30 namespace { |
31 const int kMaxRegistrations = 1000000; | 31 const int kMaxRegistrations = 1000000; |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 sender_ids, | 281 sender_ids, |
282 base::Bind(&PushMessagingServiceImpl::DidRegister, | 282 base::Bind(&PushMessagingServiceImpl::DidRegister, |
283 weak_factory_.GetWeakPtr(), | 283 weak_factory_.GetWeakPtr(), |
284 register_callback)); | 284 register_callback)); |
285 } | 285 } |
286 | 286 |
287 // TODO(johnme): Unregister should decrement the pref, and call | 287 // TODO(johnme): Unregister should decrement the pref, and call |
288 // RemoveAppHandler if the count drops to zero. | 288 // RemoveAppHandler if the count drops to zero. |
289 | 289 |
290 } // namespace gcm | 290 } // namespace gcm |
OLD | NEW |