| OLD | NEW |
| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 BrowserThread::CurrentlyOn(BrowserThread::UI)); | 184 BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 185 #if defined(ENABLE_THEMES) | 185 #if defined(ENABLE_THEMES) |
| 186 if (!chrome::IsInstantExtendedAPIEnabled()) | 186 if (!chrome::IsInstantExtendedAPIEnabled()) |
| 187 return std::string(); | 187 return std::string(); |
| 188 | 188 |
| 189 // TODO(dhollowa): Determine fraction of custom themes that don't affect the | 189 // TODO(dhollowa): Determine fraction of custom themes that don't affect the |
| 190 // NTP background and/or color. | 190 // NTP background and/or color. |
| 191 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile_); | 191 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile_); |
| 192 // NTP is considered themed if the theme is not default and not native (GTK+). | 192 // NTP is considered themed if the theme is not default and not native (GTK+). |
| 193 if (theme_service && !theme_service->UsingDefaultTheme() && | 193 if (theme_service && !theme_service->UsingDefaultTheme() && |
| 194 !theme_service->UsingNativeTheme()) | 194 !theme_service->UsingSystemTheme()) |
| 195 return "es_th=1&"; | 195 return "es_th=1&"; |
| 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 } |
| OLD | NEW |