OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A library to manage RLZ information for access-points shared | 5 // A library to manage RLZ information for access-points shared |
6 // across different client applications. | 6 // across different client applications. |
7 // | 7 // |
8 // All functions return true on success and false on error. | 8 // All functions return true on success and false on error. |
9 // This implemenation is thread safe. | 9 // This implemenation is thread safe. |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 namespace net { | 48 namespace net { |
49 class URLRequestContextGetter; | 49 class URLRequestContextGetter; |
50 } // namespace net | 50 } // namespace net |
51 #endif | 51 #endif |
52 | 52 |
53 namespace rlz_lib { | 53 namespace rlz_lib { |
54 | 54 |
55 class ScopedRlzValueStoreLock; | 55 class ScopedRlzValueStoreLock; |
56 | 56 |
57 // The maximum length of an access points RLZ in bytes. | 57 // The maximum length of an access points RLZ in bytes. |
58 const int kMaxRlzLength = 64; | 58 const size_t kMaxRlzLength = 64; |
59 // The maximum length of an access points RLZ in bytes. | 59 // The maximum length of an access points RLZ in bytes. |
60 const int kMaxDccLength = 128; | 60 const size_t kMaxDccLength = 128; |
61 // The maximum length of a CGI string in bytes. | 61 // The maximum length of a CGI string in bytes. |
62 const int kMaxCgiLength = 2048; | 62 const size_t kMaxCgiLength = 2048; |
63 // The maximum length of a ping response we will parse in bytes. If the response | 63 // The maximum length of a ping response we will parse in bytes. If the response |
64 // is bigger, please break it up into separate calls. | 64 // is bigger, please break it up into separate calls. |
65 const int kMaxPingResponseLength = 0x4000; // 16K | 65 const size_t kMaxPingResponseLength = 0x4000; // 16K |
66 | 66 |
67 #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) | 67 #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) |
68 // Set the URLRequestContextGetter used by SendFinancialPing(). The IO message | 68 // Set the URLRequestContextGetter used by SendFinancialPing(). The IO message |
69 // loop returned by this context will be used for the IO done by | 69 // loop returned by this context will be used for the IO done by |
70 // SendFinancialPing(). | 70 // SendFinancialPing(). |
71 bool RLZ_LIB_API SetURLRequestContext(net::URLRequestContextGetter* context); | 71 bool RLZ_LIB_API SetURLRequestContext(net::URLRequestContextGetter* context); |
72 #endif | 72 #endif |
73 | 73 |
74 // RLZ storage functions. | 74 // RLZ storage functions. |
75 | 75 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 326 |
327 static const std::string& GetBrand(); | 327 static const std::string& GetBrand(); |
328 | 328 |
329 private: | 329 private: |
330 ScopedRlzValueStoreLock* lock_; | 330 ScopedRlzValueStoreLock* lock_; |
331 }; | 331 }; |
332 | 332 |
333 } // namespace rlz_lib | 333 } // namespace rlz_lib |
334 | 334 |
335 #endif // RLZ_LIB_RLZ_LIB_H_ | 335 #endif // RLZ_LIB_RLZ_LIB_H_ |
OLD | NEW |