| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This code glues the RLZ library DLL with Chrome. It allows Chrome to work | 5 // This code glues the RLZ library DLL with Chrome. It allows Chrome to work |
| 6 // with or without the DLL being present. If the DLL is not present the | 6 // with or without the DLL being present. If the DLL is not present the |
| 7 // functions do nothing and just return false. | 7 // functions do nothing and just return false. |
| 8 | 8 |
| 9 #include "chrome/browser/rlz/rlz.h" | 9 #include "chrome/browser/rlz/rlz.h" |
| 10 | 10 |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 return true; | 392 return true; |
| 393 } | 393 } |
| 394 | 394 |
| 395 bool RLZTracker::ScheduleGetAccessPointRlz(rlz_lib::AccessPoint point) { | 395 bool RLZTracker::ScheduleGetAccessPointRlz(rlz_lib::AccessPoint point) { |
| 396 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) | 396 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) |
| 397 return false; | 397 return false; |
| 398 | 398 |
| 399 string16* not_used = NULL; | 399 string16* not_used = NULL; |
| 400 BrowserThread::PostTask( | 400 BrowserThread::PostTask( |
| 401 BrowserThread::FILE, FROM_HERE, | 401 BrowserThread::FILE, FROM_HERE, |
| 402 base::IgnoreReturn<bool>( | 402 base::Bind(base::IgnoreResult(&RLZTracker::GetAccessPointRlz), point, |
| 403 base::Bind(&RLZTracker::GetAccessPointRlz, point, not_used))); | 403 not_used)); |
| 404 return true; | 404 return true; |
| 405 } | 405 } |
| 406 | 406 |
| 407 // static | 407 // static |
| 408 void RLZTracker::CleanupRlz() { | 408 void RLZTracker::CleanupRlz() { |
| 409 GetInstance()->rlz_cache_.clear(); | 409 GetInstance()->rlz_cache_.clear(); |
| 410 GetInstance()->registrar_.RemoveAll(); | 410 GetInstance()->registrar_.RemoveAll(); |
| 411 } | 411 } |
| OLD | NEW |