| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/search_engines/ui_thread_search_terms_data.h" | 5 #include "ios/chrome/browser/search_engines/ui_thread_search_terms_data.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "components/google/core/browser/google_url_tracker.h" | 9 #include "components/google/core/browser/google_url_tracker.h" |
| 10 #include "components/google/core/browser/google_util.h" | 10 #include "components/google/core/browser/google_util.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 base::string16 rlz_string; | 60 base::string16 rlz_string; |
| 61 #if defined(ENABLE_RLZ) | 61 #if defined(ENABLE_RLZ) |
| 62 // For organic brandcode do not use rlz at all. | 62 // For organic brandcode do not use rlz at all. |
| 63 std::string brand; | 63 std::string brand; |
| 64 if (ios::google_brand::GetBrand(&brand) && | 64 if (ios::google_brand::GetBrand(&brand) && |
| 65 !ios::google_brand::IsOrganic(brand)) { | 65 !ios::google_brand::IsOrganic(brand)) { |
| 66 // This call will may return false until the value has been cached. This | 66 // This call will may return false until the value has been cached. This |
| 67 // normally would mean that a few omnibox searches might not send the RLZ | 67 // normally would mean that a few omnibox searches might not send the RLZ |
| 68 // data but this is not really a problem (as the value will eventually be | 68 // data but this is not really a problem (as the value will eventually be |
| 69 // set and cached). | 69 // set and cached). |
| 70 rlz::RLZTracker::GetAccessPointRLZ(rlz::RLZTracker::ChromeOmnibox(), | 70 rlz::RLZTracker::GetAccessPointRlz(rlz::RLZTracker::ChromeOmnibox(), |
| 71 &rlz_string); | 71 &rlz_string); |
| 72 } | 72 } |
| 73 #endif | 73 #endif |
| 74 return rlz_string; | 74 return rlz_string; |
| 75 } | 75 } |
| 76 | 76 |
| 77 std::string UIThreadSearchTermsData::GetSearchClient() const { | 77 std::string UIThreadSearchTermsData::GetSearchClient() const { |
| 78 DCHECK(thread_checker_.CalledOnValidThread()); | 78 DCHECK(thread_checker_.CalledOnValidThread()); |
| 79 return std::string(); | 79 return std::string(); |
| 80 } | 80 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 126 } |
| 127 | 127 |
| 128 std::string UIThreadSearchTermsData::GoogleImageSearchSource() const { | 128 std::string UIThreadSearchTermsData::GoogleImageSearchSource() const { |
| 129 DCHECK(thread_checker_.CalledOnValidThread()); | 129 DCHECK(thread_checker_.CalledOnValidThread()); |
| 130 return ios::GetChromeBrowserProvider() | 130 return ios::GetChromeBrowserProvider() |
| 131 ->GetSearchProvider() | 131 ->GetSearchProvider() |
| 132 ->GoogleImageSearchSource(); | 132 ->GoogleImageSearchSource(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace ios | 135 } // namespace ios |
| OLD | NEW |