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

Side by Side Diff: rlz/lib/financial_ping.cc

Issue 11412067: [rlz,cros] RLZ glue for ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/pyautolib/pyauto.py ('k') | no next file » | 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) 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 return true; 176 return true;
177 } 177 }
178 178
179 #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) 179 #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET)
180 // The URLRequestContextGetter used by FinancialPing::PingServer(). 180 // The URLRequestContextGetter used by FinancialPing::PingServer().
181 net::URLRequestContextGetter* g_context; 181 net::URLRequestContextGetter* g_context;
182 182
183 bool FinancialPing::SetURLRequestContext( 183 bool FinancialPing::SetURLRequestContext(
184 net::URLRequestContextGetter* context) { 184 net::URLRequestContextGetter* context) {
185 ScopedRlzValueStoreLock lock;
186 RlzValueStore* store = lock.GetStore();
187 if (!store)
188 return false;
189
190 g_context = context; 185 g_context = context;
191 return true; 186 return true;
192 } 187 }
193 188
194 namespace { 189 namespace {
195 190
196 class FinancialPingUrlFetcherDelegate : public net::URLFetcherDelegate { 191 class FinancialPingUrlFetcherDelegate : public net::URLFetcherDelegate {
197 public: 192 public:
198 FinancialPingUrlFetcherDelegate(const base::Closure& callback) 193 FinancialPingUrlFetcherDelegate(const base::Closure& callback)
199 : callback_(callback) { 194 : callback_(callback) {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 349
355 bool FinancialPing::ClearLastPingTime(Product product) { 350 bool FinancialPing::ClearLastPingTime(Product product) {
356 ScopedRlzValueStoreLock lock; 351 ScopedRlzValueStoreLock lock;
357 RlzValueStore* store = lock.GetStore(); 352 RlzValueStore* store = lock.GetStore();
358 if (!store || !store->HasAccess(RlzValueStore::kWriteAccess)) 353 if (!store || !store->HasAccess(RlzValueStore::kWriteAccess))
359 return false; 354 return false;
360 return store->ClearPingTime(product); 355 return store->ClearPingTime(product);
361 } 356 }
362 357
363 } // namespace 358 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/pyautolib/pyauto.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698