| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 } // namespace | 267 } // namespace |
| 268 | 268 |
| 269 bool RLZTracker::InitRlz(int directory_key) { | 269 bool RLZTracker::InitRlz(int directory_key) { |
| 270 return LoadRLZLibrary(directory_key); | 270 return LoadRLZLibrary(directory_key); |
| 271 } | 271 } |
| 272 | 272 |
| 273 bool RLZTracker::InitRlzDelayed(int directory_key, bool first_run) { | 273 bool RLZTracker::InitRlzDelayed(int directory_key, bool first_run) { |
| 274 new OmniBoxUsageObserver(); | 274 new OmniBoxUsageObserver(); |
| 275 // Schedule the delayed init items. | 275 // Schedule the delayed init items. |
| 276 const int kTwentySeconds = 20 * 1000; | 276 const int kNinetySeconds = 90 * 1000; |
| 277 MessageLoop::current()->PostDelayedTask(FROM_HERE, | 277 MessageLoop::current()->PostDelayedTask(FROM_HERE, |
| 278 new DelayedInitTask(directory_key, first_run), kTwentySeconds); | 278 new DelayedInitTask(directory_key, first_run), kNinetySeconds); |
| 279 return true; | 279 return true; |
| 280 } | 280 } |
| 281 | 281 |
| 282 bool RLZTracker::RecordProductEvent(Product product, AccessPoint point, | 282 bool RLZTracker::RecordProductEvent(Product product, AccessPoint point, |
| 283 Event event) { | 283 Event event) { |
| 284 return (record_event) ? record_event(product, point, event, NULL) : false; | 284 return (record_event) ? record_event(product, point, event, NULL) : false; |
| 285 } | 285 } |
| 286 | 286 |
| 287 bool RLZTracker::ClearAllProductEvents(Product product) { | 287 bool RLZTracker::ClearAllProductEvents(Product product) { |
| 288 return (clear_all_events) ? clear_all_events(product, NULL) : false; | 288 return (clear_all_events) ? clear_all_events(product, NULL) : false; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 305 if (!get_access_point(point, str_rlz, kMaxRlzLength, NULL)) | 305 if (!get_access_point(point, str_rlz, kMaxRlzLength, NULL)) |
| 306 return false; | 306 return false; |
| 307 if (CHROME_OMNIBOX == point) { | 307 if (CHROME_OMNIBOX == point) { |
| 308 access_values_state = ACCESS_VALUES_FRESH; | 308 access_values_state = ACCESS_VALUES_FRESH; |
| 309 cached_ommibox_rlz.assign(str_rlz); | 309 cached_ommibox_rlz.assign(str_rlz); |
| 310 } | 310 } |
| 311 *rlz = str_rlz; | 311 *rlz = str_rlz; |
| 312 return true; | 312 return true; |
| 313 } | 313 } |
| 314 | 314 |
| OLD | NEW |