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

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

Issue 292983003: Use different Access Point on iOS for phone and tablet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/browser/rlz/rlz_win.cc ('k') | chrome/browser/search_engines/template_url_service.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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 base::string16 rlz_string; 118 base::string16 rlz_string;
119 #if defined(ENABLE_RLZ) 119 #if defined(ENABLE_RLZ)
120 // For organic brandcodes do not use rlz at all. Empty brandcode usually 120 // For organic brandcodes do not use rlz at all. Empty brandcode usually
121 // means a chromium install. This is ok. 121 // means a chromium install. This is ok.
122 std::string brand; 122 std::string brand;
123 if (google_util::GetBrand(&brand) && !brand.empty() && 123 if (google_util::GetBrand(&brand) && !brand.empty() &&
124 !google_util::IsOrganic(brand)) { 124 !google_util::IsOrganic(brand)) {
125 // This call will return false the first time(s) it is called until the 125 // This call will return false the first time(s) it is called until the
126 // value has been cached. This normally would mean that at most one omnibox 126 // value has been cached. This normally would mean that at most one omnibox
127 // search might not send the RLZ data but this is not really a problem. 127 // search might not send the RLZ data but this is not really a problem.
128 rlz_lib::AccessPoint access_point = RLZTracker::CHROME_OMNIBOX; 128 rlz_lib::AccessPoint access_point = RLZTracker::ChromeOmnibox();
129 #if !defined(OS_IOS) 129 #if !defined(OS_IOS)
130 if (from_app_list) 130 if (from_app_list)
131 access_point = RLZTracker::CHROME_APP_LIST; 131 access_point = RLZTracker::ChromeAppList();
132 #endif 132 #endif
133 RLZTracker::GetAccessPointRlz(access_point, &rlz_string); 133 RLZTracker::GetAccessPointRlz(access_point, &rlz_string);
134 } 134 }
135 #endif 135 #endif
136 return rlz_string; 136 return rlz_string;
137 } 137 }
138 138
139 // We can enable this on non-Android if other platforms ever want a non-empty 139 // We can enable this on non-Android if other platforms ever want a non-empty
140 // search client string. There is already a unit test in place for Android 140 // search client string. There is already a unit test in place for Android
141 // called TemplateURLTest::SearchClient. 141 // called TemplateURLTest::SearchClient.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/rlz/rlz_win.cc ('k') | chrome/browser/search_engines/template_url_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698