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

Side by Side Diff: net/spdy/core/spdy_header_indexing.h

Issue 2839373002: Implement SPDY_EXPORT and SPDY_EXPORT_PRIVATE macros. (Closed)
Patch Set: Rebase: manually resolve trivial merge conflicts. Created 3 years, 7 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
« no previous file with comments | « net/spdy/core/spdy_header_block.h ('k') | net/spdy/core/spdy_headers_handler_interface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 #ifndef NET_SPDY_CORE_SPDY_HEADER_INDEXING_H_ 5 #ifndef NET_SPDY_CORE_SPDY_HEADER_INDEXING_H_
6 #define NET_SPDY_CORE_SPDY_HEADER_INDEXING_H_ 6 #define NET_SPDY_CORE_SPDY_HEADER_INDEXING_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory> 9 #include <memory>
10 #include <unordered_set> 10 #include <unordered_set>
11 #include <utility> 11 #include <utility>
12 12
13 #include "net/base/net_export.h" 13 #include "net/spdy/platform/api/spdy_export.h"
14 #include "net/spdy/platform/api/spdy_string.h" 14 #include "net/spdy/platform/api/spdy_string.h"
15 #include "net/spdy/platform/api/spdy_string_piece.h" 15 #include "net/spdy/platform/api/spdy_string_piece.h"
16 16
17 namespace net { 17 namespace net {
18 18
19 namespace test { 19 namespace test {
20 class HeaderIndexingPeer; 20 class HeaderIndexingPeer;
21 } 21 }
22 22
23 NET_EXPORT_PRIVATE extern int32_t FLAGS_gfe_spdy_indexing_set_bound; 23 SPDY_EXPORT_PRIVATE extern int32_t FLAGS_gfe_spdy_indexing_set_bound;
24 NET_EXPORT_PRIVATE extern int32_t FLAGS_gfe_spdy_tracking_set_bound; 24 SPDY_EXPORT_PRIVATE extern int32_t FLAGS_gfe_spdy_tracking_set_bound;
25 25
26 // Maintain two headers sets: Indexing set and tracking 26 // Maintain two headers sets: Indexing set and tracking
27 // set. Call ShouldIndex() for each header to decide if to index it. If for some 27 // set. Call ShouldIndex() for each header to decide if to index it. If for some
28 // connections, we decide to index all headers, we may still want to call 28 // connections, we decide to index all headers, we may still want to call
29 // UpdateSets to log the headers into both sets. 29 // UpdateSets to log the headers into both sets.
30 class NET_EXPORT HeaderIndexing { 30 class SPDY_EXPORT_PRIVATE HeaderIndexing {
31 public: 31 public:
32 using HeaderSet = std::unordered_set<SpdyString>; 32 using HeaderSet = std::unordered_set<SpdyString>;
33 33
34 HeaderIndexing(); 34 HeaderIndexing();
35 ~HeaderIndexing(); 35 ~HeaderIndexing();
36 36
37 void CreateInitIndexingHeaders(); 37 void CreateInitIndexingHeaders();
38 38
39 // Decide if a header should be indexed. We only use |header|. Add |value| to 39 // Decide if a header should be indexed. We only use |header|. Add |value| to
40 // be consistent with HPACK indexing policy interface. 40 // be consistent with HPACK indexing policy interface.
(...skipping 21 matching lines...) Expand all
62 const size_t tracking_set_bound_; 62 const size_t tracking_set_bound_;
63 int64_t total_header_count_ = 0; 63 int64_t total_header_count_ = 0;
64 int64_t update_only_header_count_ = 0; 64 int64_t update_only_header_count_ = 0;
65 int64_t missed_header_in_indexing_ = 0; 65 int64_t missed_header_in_indexing_ = 0;
66 int64_t missed_header_in_tracking_ = 0; 66 int64_t missed_header_in_tracking_ = 0;
67 }; 67 };
68 68
69 } // namespace net 69 } // namespace net
70 70
71 #endif // NET_SPDY_CORE_SPDY_HEADER_INDEXING_H_ 71 #endif // NET_SPDY_CORE_SPDY_HEADER_INDEXING_H_
OLDNEW
« no previous file with comments | « net/spdy/core/spdy_header_block.h ('k') | net/spdy/core/spdy_headers_handler_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698