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

Side by Side Diff: chrome/browser/search_engines/search_terms_data_android.cc

Issue 228013002: Use whether a query is from the app list to determine the RLZ parameter. (Closed) Base URL: http://git.chromium.org/chromium/src.git@rlz-access-ids
Patch Set: Created 6 years, 8 months 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/search_engines/search_terms_data_android.h" 5 #include "chrome/browser/search_engines/search_terms_data_android.h"
6 6
7 #include "chrome/browser/search_engines/search_terms_data.h" 7 #include "chrome/browser/search_engines/search_terms_data.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 9
10 base::LazyInstance<base::string16>::Leaky 10 base::LazyInstance<base::string16>::Leaky
11 SearchTermsDataAndroid::rlz_parameter_value_ = LAZY_INSTANCE_INITIALIZER; 11 SearchTermsDataAndroid::rlz_parameter_value_ = LAZY_INSTANCE_INITIALIZER;
12 base::LazyInstance<std::string>::Leaky 12 base::LazyInstance<std::string>::Leaky
13 SearchTermsDataAndroid::search_client_ = LAZY_INSTANCE_INITIALIZER; 13 SearchTermsDataAndroid::search_client_ = LAZY_INSTANCE_INITIALIZER;
14 14
15 base::string16 UIThreadSearchTermsData::GetRlzParameterValue() const { 15 base::string16 UIThreadSearchTermsData::GetRlzParameterValue(
16 bool from_app_list) const {
16 DCHECK(!content::BrowserThread::IsThreadInitialized( 17 DCHECK(!content::BrowserThread::IsThreadInitialized(
17 content::BrowserThread::UI) || 18 content::BrowserThread::UI) ||
18 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 19 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
19 // Android doesn't use the rlz library. Instead, it manages the rlz string 20 // Android doesn't use the rlz library. Instead, it manages the rlz string
20 // on its own. 21 // on its own.
21 return SearchTermsDataAndroid::rlz_parameter_value_.Get(); 22 return SearchTermsDataAndroid::rlz_parameter_value_.Get();
22 } 23 }
23 24
24 std::string UIThreadSearchTermsData::GetSearchClient() const { 25 std::string UIThreadSearchTermsData::GetSearchClient() const {
25 DCHECK(!content::BrowserThread::IsThreadInitialized( 26 DCHECK(!content::BrowserThread::IsThreadInitialized(
26 content::BrowserThread::UI) || 27 content::BrowserThread::UI) ||
27 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 28 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
28 return SearchTermsDataAndroid::search_client_.Get(); 29 return SearchTermsDataAndroid::search_client_.Get();
29 } 30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698