| 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 // 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 130                                 rlz_lib::FIRST_SEARCH); | 130                                 rlz_lib::FIRST_SEARCH); | 
| 131   } | 131   } | 
| 132 } | 132 } | 
| 133 | 133 | 
| 134 bool SendFinancialPing(const std::string& brand, | 134 bool SendFinancialPing(const std::string& brand, | 
| 135                        const base::string16& lang, | 135                        const base::string16& lang, | 
| 136                        const base::string16& referral) { | 136                        const base::string16& referral) { | 
| 137   rlz_lib::AccessPoint points[] = {RLZTracker::CHROME_OMNIBOX, | 137   rlz_lib::AccessPoint points[] = {RLZTracker::CHROME_OMNIBOX, | 
| 138                                    RLZTracker::CHROME_HOME_PAGE, | 138                                    RLZTracker::CHROME_HOME_PAGE, | 
| 139                                    rlz_lib::NO_ACCESS_POINT}; | 139                                    rlz_lib::NO_ACCESS_POINT}; | 
| 140   std::string lang_ascii(UTF16ToASCII(lang)); | 140   std::string lang_ascii(base::UTF16ToASCII(lang)); | 
| 141   std::string referral_ascii(UTF16ToASCII(referral)); | 141   std::string referral_ascii(base::UTF16ToASCII(referral)); | 
| 142   std::string product_signature; | 142   std::string product_signature; | 
| 143 #if defined(OS_CHROMEOS) | 143 #if defined(OS_CHROMEOS) | 
| 144   product_signature = "chromeos"; | 144   product_signature = "chromeos"; | 
| 145 #else | 145 #else | 
| 146   product_signature = "chrome"; | 146   product_signature = "chrome"; | 
| 147 #endif | 147 #endif | 
| 148   return rlz_lib::SendFinancialPing(rlz_lib::CHROME, points, | 148   return rlz_lib::SendFinancialPing(rlz_lib::CHROME, points, | 
| 149                                     product_signature.c_str(), | 149                                     product_signature.c_str(), | 
| 150                                     brand.c_str(), referral_ascii.c_str(), | 150                                     brand.c_str(), referral_ascii.c_str(), | 
| 151                                     lang_ascii.c_str(), false, true); | 151                                     lang_ascii.c_str(), false, true); | 
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 586 void RLZTracker::CleanupRlz() { | 586 void RLZTracker::CleanupRlz() { | 
| 587   GetInstance()->rlz_cache_.clear(); | 587   GetInstance()->rlz_cache_.clear(); | 
| 588   GetInstance()->registrar_.RemoveAll(); | 588   GetInstance()->registrar_.RemoveAll(); | 
| 589   rlz_lib::SetURLRequestContext(NULL); | 589   rlz_lib::SetURLRequestContext(NULL); | 
| 590 } | 590 } | 
| 591 | 591 | 
| 592 // static | 592 // static | 
| 593 void RLZTracker::EnableZeroDelayForTesting() { | 593 void RLZTracker::EnableZeroDelayForTesting() { | 
| 594   GetInstance()->min_init_delay_ = base::TimeDelta(); | 594   GetInstance()->min_init_delay_ = base::TimeDelta(); | 
| 595 } | 595 } | 
| OLD | NEW | 
|---|