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

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

Issue 282183002: [AiS] Enable AiS flag on all platforms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed Android instance when removing helper. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/search/search.cc ('k') | chrome/browser/search_engines/template_url.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "chrome/browser/search_engines/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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 #endif 159 #endif
160 } 160 }
161 161
162 std::string UIThreadSearchTermsData::GetSuggestRequestIdentifier() const { 162 std::string UIThreadSearchTermsData::GetSuggestRequestIdentifier() const {
163 DCHECK(!BrowserThread::IsThreadInitialized(BrowserThread::UI) || 163 DCHECK(!BrowserThread::IsThreadInitialized(BrowserThread::UI) ||
164 BrowserThread::CurrentlyOn(BrowserThread::UI)); 164 BrowserThread::CurrentlyOn(BrowserThread::UI));
165 #if defined(OS_ANDROID) 165 #if defined(OS_ANDROID)
166 sync_pb::SyncEnums::DeviceType device_type = 166 sync_pb::SyncEnums::DeviceType device_type =
167 browser_sync::DeviceInfo::GetLocalDeviceType(); 167 browser_sync::DeviceInfo::GetLocalDeviceType();
168 if (device_type == sync_pb::SyncEnums_DeviceType_TYPE_PHONE) { 168 if (device_type == sync_pb::SyncEnums_DeviceType_TYPE_PHONE) {
169 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 169 if (CommandLine::ForCurrentProcess()->HasSwitch(
170 switches::kEnableAnswersInSuggest)) { 170 switches::kEnableAnswersInSuggest)) {
171 return "chrome-mobile-ext-ansg"; 171 return "chrome-mobile-ext-ansg";
172 } else { 172 } else {
173 return "chrome-mobile-ext"; 173 return "chrome-mobile-ext";
174 } 174 }
175 } 175 }
176 return "chrome-ext"; 176 return "chrome-ext";
177 #else 177 #else
178 return "chrome-ext"; 178 return "chrome-ext";
179 #endif 179 #endif
(...skipping 16 matching lines...) Expand all
196 #endif // defined(ENABLE_THEMES) 196 #endif // defined(ENABLE_THEMES)
197 197
198 return std::string(); 198 return std::string();
199 } 199 }
200 200
201 // static 201 // static
202 void UIThreadSearchTermsData::SetGoogleBaseURL(const std::string& base_url) { 202 void UIThreadSearchTermsData::SetGoogleBaseURL(const std::string& base_url) {
203 delete google_base_url_; 203 delete google_base_url_;
204 google_base_url_ = base_url.empty() ? NULL : new std::string(base_url); 204 google_base_url_ = base_url.empty() ? NULL : new std::string(base_url);
205 } 205 }
OLDNEW
« no previous file with comments | « chrome/browser/search/search.cc ('k') | chrome/browser/search_engines/template_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698