| 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 #include "rlz/lib/rlz_lib.h" | 8 #include "rlz/lib/rlz_lib.h" |
| 9 | 9 |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) | 215 #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) |
| 216 bool SetURLRequestContext(net::URLRequestContextGetter* context) { | 216 bool SetURLRequestContext(net::URLRequestContextGetter* context) { |
| 217 return FinancialPing::SetURLRequestContext(context); | 217 return FinancialPing::SetURLRequestContext(context); |
| 218 } | 218 } |
| 219 #endif | 219 #endif |
| 220 | 220 |
| 221 #if defined(OS_CHROMEOS) | 221 #if defined(OS_CHROMEOS) |
| 222 void RLZ_LIB_API SetIOTaskRunner(base::SequencedTaskRunner* io_task_runner) { | 222 void RLZ_LIB_API SetIOTaskRunner(base::SequencedTaskRunner* io_task_runner) { |
| 223 RlzValueStoreChromeOS::SetIOTaskRunner(io_task_runner); | 223 RlzValueStoreChromeOS::SetIOTaskRunner(io_task_runner); |
| 224 } | 224 } |
| 225 |
| 226 void RLZ_LIB_API CleanupRlz() { |
| 227 RlzValueStoreChromeOS::Cleanup(); |
| 228 } |
| 225 #endif | 229 #endif |
| 226 | 230 |
| 227 bool GetProductEventsAsCgi(Product product, char* cgi, size_t cgi_size) { | 231 bool GetProductEventsAsCgi(Product product, char* cgi, size_t cgi_size) { |
| 228 if (!cgi || cgi_size <= 0) { | 232 if (!cgi || cgi_size <= 0) { |
| 229 ASSERT_STRING("GetProductEventsAsCgi: Invalid buffer"); | 233 ASSERT_STRING("GetProductEventsAsCgi: Invalid buffer"); |
| 230 return false; | 234 return false; |
| 231 } | 235 } |
| 232 | 236 |
| 233 cgi[0] = 0; | 237 cgi[0] = 0; |
| 234 | 238 |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 if (cgi_string.size() >= cgi_size) | 656 if (cgi_string.size() >= cgi_size) |
| 653 return false; | 657 return false; |
| 654 | 658 |
| 655 strncpy(cgi, cgi_string.c_str(), cgi_size); | 659 strncpy(cgi, cgi_string.c_str(), cgi_size); |
| 656 cgi[cgi_size - 1] = 0; | 660 cgi[cgi_size - 1] = 0; |
| 657 | 661 |
| 658 return true; | 662 return true; |
| 659 } | 663 } |
| 660 | 664 |
| 661 } // namespace rlz_lib | 665 } // namespace rlz_lib |
| OLD | NEW |