| 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 // Library functions related to the Financial Server ping. | 5 // Library functions related to the Financial Server ping. |
| 6 | 6 |
| 7 #include "rlz/lib/financial_ping.h" | 7 #include "rlz/lib/financial_ping.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 } // namespace | 43 } // namespace |
| 44 | 44 |
| 45 #else | 45 #else |
| 46 | 46 |
| 47 #include "base/bind.h" | 47 #include "base/bind.h" |
| 48 #include "base/message_loop.h" | 48 #include "base/message_loop.h" |
| 49 #include "base/run_loop.h" | 49 #include "base/run_loop.h" |
| 50 #include "base/time/time.h" | 50 #include "base/time/time.h" |
| 51 #include "googleurl/src/gurl.h" | |
| 52 #include "net/base/load_flags.h" | 51 #include "net/base/load_flags.h" |
| 53 #include "net/url_request/url_fetcher.h" | 52 #include "net/url_request/url_fetcher.h" |
| 54 #include "net/url_request/url_fetcher_delegate.h" | 53 #include "net/url_request/url_fetcher_delegate.h" |
| 55 #include "net/url_request/url_request_context.h" | 54 #include "net/url_request/url_request_context.h" |
| 56 #include "net/url_request/url_request_context_getter.h" | 55 #include "net/url_request/url_request_context_getter.h" |
| 56 #include "url/gurl.h" |
| 57 | 57 |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 namespace { | 60 namespace { |
| 61 | 61 |
| 62 // Returns the time relative to a fixed point in the past in multiples of | 62 // Returns the time relative to a fixed point in the past in multiples of |
| 63 // 100 ns stepts. The point in the past is arbitrary but can't change, as the | 63 // 100 ns stepts. The point in the past is arbitrary but can't change, as the |
| 64 // result of this value is stored on disk. | 64 // result of this value is stored on disk. |
| 65 int64 GetSystemTimeAsInt64() { | 65 int64 GetSystemTimeAsInt64() { |
| 66 #if defined(OS_WIN) | 66 #if defined(OS_WIN) |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 353 |
| 354 bool FinancialPing::ClearLastPingTime(Product product) { | 354 bool FinancialPing::ClearLastPingTime(Product product) { |
| 355 ScopedRlzValueStoreLock lock; | 355 ScopedRlzValueStoreLock lock; |
| 356 RlzValueStore* store = lock.GetStore(); | 356 RlzValueStore* store = lock.GetStore(); |
| 357 if (!store || !store->HasAccess(RlzValueStore::kWriteAccess)) | 357 if (!store || !store->HasAccess(RlzValueStore::kWriteAccess)) |
| 358 return false; | 358 return false; |
| 359 return store->ClearPingTime(product); | 359 return store->ClearPingTime(product); |
| 360 } | 360 } |
| 361 | 361 |
| 362 } // namespace | 362 } // namespace |
| OLD | NEW |