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 "google_apis/gcm/engine/gcm_store_impl.h" | 5 #include "google_apis/gcm/engine/gcm_store_impl.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/message_loop/message_loop_proxy.h" | 13 #include "base/message_loop/message_loop_proxy.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "base/sequenced_task_runner.h" | 15 #include "base/sequenced_task_runner.h" |
16 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/string_piece.h" | 18 #include "base/strings/string_piece.h" |
19 #include "base/tracked_objects.h" | 19 #include "base/tracked_objects.h" |
20 #include "components/encryptor/os_crypt.h" | 20 #include "components/os_crypt/os_crypt.h" |
21 #include "google_apis/gcm/base/mcs_message.h" | 21 #include "google_apis/gcm/base/mcs_message.h" |
22 #include "google_apis/gcm/base/mcs_util.h" | 22 #include "google_apis/gcm/base/mcs_util.h" |
23 #include "google_apis/gcm/protocol/mcs.pb.h" | 23 #include "google_apis/gcm/protocol/mcs.pb.h" |
24 #include "third_party/leveldatabase/src/include/leveldb/db.h" | 24 #include "third_party/leveldatabase/src/include/leveldb/db.h" |
25 | 25 |
26 namespace gcm { | 26 namespace gcm { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 // Limit to the number of outstanding messages per app. | 30 // Limit to the number of outstanding messages per app. |
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 removed_message_counts.begin(); | 845 removed_message_counts.begin(); |
846 iter != removed_message_counts.end(); ++iter) { | 846 iter != removed_message_counts.end(); ++iter) { |
847 DCHECK_NE(app_message_counts_.count(iter->first), 0U); | 847 DCHECK_NE(app_message_counts_.count(iter->first), 0U); |
848 app_message_counts_[iter->first] -= iter->second; | 848 app_message_counts_[iter->first] -= iter->second; |
849 DCHECK_GE(app_message_counts_[iter->first], 0); | 849 DCHECK_GE(app_message_counts_[iter->first], 0); |
850 } | 850 } |
851 callback.Run(true); | 851 callback.Run(true); |
852 } | 852 } |
853 | 853 |
854 } // namespace gcm | 854 } // namespace gcm |
OLD | NEW |