| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) | 47 #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) |
| 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 // All functions return true on success and false on error. |
| 56 // This implemenation is thread safe. |
| 57 // |
| 58 // Each prototype mentions the registry access requirements: |
| 59 // |
| 60 // HKLM read: Will work from any process and at any privilege level on Vista. |
| 61 // HKCU read: Calls made from the SYSTEM account must pass the current user's |
| 62 // SID as the optional 'sid' param. Can be called from low integrity |
| 63 // process on Vista. |
| 64 // HKCU write: Calls made from the SYSTEM account must pass the current user's |
| 65 // SID as the optional 'sid' param. Calls require at least medium |
| 66 // integrity on Vista (e.g. Toolbar will need to use their broker) |
| 67 // HKLM write: Calls must be made from an account with admin rights. No SID |
| 68 // need be passed when running as SYSTEM. |
| 69 // Functions which do not access registry will be marked with "no restrictions". |
| 70 |
| 55 class ScopedRlzValueStoreLock; | 71 class ScopedRlzValueStoreLock; |
| 56 | 72 |
| 57 // The maximum length of an access points RLZ in bytes. | 73 // The maximum length of an access points RLZ in bytes. |
| 58 const size_t kMaxRlzLength = 64; | 74 const size_t kMaxRlzLength = 64; |
| 59 // The maximum length of an access points RLZ in bytes. | 75 // The maximum length of an access points RLZ in bytes. |
| 60 const size_t kMaxDccLength = 128; | 76 const size_t kMaxDccLength = 128; |
| 61 // The maximum length of a CGI string in bytes. | 77 // The maximum length of a CGI string in bytes. |
| 62 const size_t kMaxCgiLength = 2048; | 78 const size_t kMaxCgiLength = 2048; |
| 63 // The maximum length of a ping response we will parse in bytes. If the response | 79 // 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. | 80 // is bigger, please break it up into separate calls. |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 342 |
| 327 static const std::string& GetBrand(); | 343 static const std::string& GetBrand(); |
| 328 | 344 |
| 329 private: | 345 private: |
| 330 ScopedRlzValueStoreLock* lock_; | 346 ScopedRlzValueStoreLock* lock_; |
| 331 }; | 347 }; |
| 332 | 348 |
| 333 } // namespace rlz_lib | 349 } // namespace rlz_lib |
| 334 | 350 |
| 335 #endif // RLZ_LIB_RLZ_LIB_H_ | 351 #endif // RLZ_LIB_RLZ_LIB_H_ |
| OLD | NEW |