OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/search_engines/search_terms_data_android.h" |
| 6 |
| 7 #include "chrome/browser/search_engines/search_terms_data.h" |
| 8 #include "content/public/browser/browser_thread.h" |
| 9 |
| 10 base::LazyInstance<string16>::Leaky |
| 11 SearchTermsDataAndroid::rlz_parameter_value_ = LAZY_INSTANCE_INITIALIZER; |
| 12 base::LazyInstance<std::string>::Leaky |
| 13 SearchTermsDataAndroid::search_client_ = LAZY_INSTANCE_INITIALIZER; |
| 14 |
| 15 string16 UIThreadSearchTermsData::GetRlzParameterValue() const { |
| 16 DCHECK( |
| 17 !content::BrowserThread::IsWellKnownThread(content::BrowserThread::UI) || |
| 18 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| 19 // Android doesn't use the rlz library. Instead, it manages the rlz string |
| 20 // on its own. |
| 21 return SearchTermsDataAndroid::rlz_parameter_value_.Get(); |
| 22 } |
| 23 |
| 24 std::string UIThreadSearchTermsData::GetSearchClient() const { |
| 25 DCHECK( |
| 26 !content::BrowserThread::IsWellKnownThread(content::BrowserThread::UI) || |
| 27 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| 28 return SearchTermsDataAndroid::search_client_.Get(); |
| 29 } |
OLD | NEW |