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

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

Issue 447073002: [AiS] widen AiS to iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui_thread_search_terms_data.h" 5 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 BrowserThread::CurrentlyOn(BrowserThread::UI)); 117 BrowserThread::CurrentlyOn(BrowserThread::UI));
118 #if defined(OS_ANDROID) 118 #if defined(OS_ANDROID)
119 sync_pb::SyncEnums::DeviceType device_type = 119 sync_pb::SyncEnums::DeviceType device_type =
120 browser_sync::DeviceInfo::GetLocalDeviceType(); 120 browser_sync::DeviceInfo::GetLocalDeviceType();
121 if (device_type == sync_pb::SyncEnums_DeviceType_TYPE_PHONE) { 121 if (device_type == sync_pb::SyncEnums_DeviceType_TYPE_PHONE) {
122 return OmniboxFieldTrial::EnableAnswersInSuggest() ? 122 return OmniboxFieldTrial::EnableAnswersInSuggest() ?
123 "chrome-mobile-ext-ansg" : "chrome-mobile-ext"; 123 "chrome-mobile-ext-ansg" : "chrome-mobile-ext";
124 } 124 }
125 return OmniboxFieldTrial::EnableAnswersInSuggest() ? 125 return OmniboxFieldTrial::EnableAnswersInSuggest() ?
126 "chrome-ext-ansg" : "chrome-ext"; 126 "chrome-ext-ansg" : "chrome-ext";
127 #elif defined(OS_IOS)
128 return OmniboxFieldTrial::EnableAnswersInSuggest() ?
129 "chrome-ext-ansg" : "chrome-ext";
127 #else 130 #else
128 return "chrome-ext"; 131 return "chrome-ext";
129 #endif 132 #endif
130 } 133 }
131 134
132 bool UIThreadSearchTermsData::EnableAnswersInSuggest() const { 135 bool UIThreadSearchTermsData::EnableAnswersInSuggest() const {
133 return OmniboxFieldTrial::EnableAnswersInSuggest(); 136 return OmniboxFieldTrial::EnableAnswersInSuggest();
134 } 137 }
135 138
136 bool UIThreadSearchTermsData::IsShowingSearchTermsOnSearchResultsPages() const { 139 bool UIThreadSearchTermsData::IsShowingSearchTermsOnSearchResultsPages() const {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 return version; 194 return version;
192 } 195 }
193 return "unknown"; 196 return "unknown";
194 } 197 }
195 198
196 // static 199 // static
197 void UIThreadSearchTermsData::SetGoogleBaseURL(const std::string& base_url) { 200 void UIThreadSearchTermsData::SetGoogleBaseURL(const std::string& base_url) {
198 delete google_base_url_; 201 delete google_base_url_;
199 google_base_url_ = base_url.empty() ? NULL : new std::string(base_url); 202 google_base_url_ = base_url.empty() ? NULL : new std::string(base_url);
200 } 203 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698