| 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/rlz/rlz_tracker_delegate_impl.h" | 5 #include "ios/chrome/browser/rlz/rlz_tracker_delegate_impl.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 "components/omnibox/browser/omnibox_event_global_tracker.h" | 9 #include "components/omnibox/browser/omnibox_event_global_tracker.h" |
| 10 #include "components/omnibox/browser/omnibox_log.h" | 10 #include "components/omnibox/browser/omnibox_log.h" |
| 11 #include "components/search_engines/template_url.h" | 11 #include "components/search_engines/template_url.h" |
| 12 #include "components/search_engines/template_url_service.h" | 12 #include "components/search_engines/template_url_service.h" |
| 13 #include "ios/chrome/browser/application_context.h" | 13 #include "ios/chrome/browser/application_context.h" |
| 14 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 14 #include "ios/chrome/browser/google/google_brand.h" | 15 #include "ios/chrome/browser/google/google_brand.h" |
| 15 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" | 16 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" |
| 16 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | |
| 17 #include "ios/web/public/web_thread.h" | 17 #include "ios/web/public/web_thread.h" |
| 18 | 18 |
| 19 RLZTrackerDelegateImpl::RLZTrackerDelegateImpl() {} | 19 RLZTrackerDelegateImpl::RLZTrackerDelegateImpl() {} |
| 20 | 20 |
| 21 RLZTrackerDelegateImpl::~RLZTrackerDelegateImpl() {} | 21 RLZTrackerDelegateImpl::~RLZTrackerDelegateImpl() {} |
| 22 | 22 |
| 23 // static | 23 // static |
| 24 bool RLZTrackerDelegateImpl::IsGoogleDefaultSearch( | 24 bool RLZTrackerDelegateImpl::IsGoogleDefaultSearch( |
| 25 ios::ChromeBrowserState* browser_state) { | 25 ios::ChromeBrowserState* browser_state) { |
| 26 bool is_google_default_search = false; | 26 bool is_google_default_search = false; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 return; | 125 return; |
| 126 | 126 |
| 127 on_omnibox_url_opened_subscription_.reset(); | 127 on_omnibox_url_opened_subscription_.reset(); |
| 128 | 128 |
| 129 using std::swap; | 129 using std::swap; |
| 130 base::Closure callback_to_run; | 130 base::Closure callback_to_run; |
| 131 swap(callback_to_run, on_omnibox_search_callback_); | 131 swap(callback_to_run, on_omnibox_search_callback_); |
| 132 if (!callback_to_run.is_null()) | 132 if (!callback_to_run.is_null()) |
| 133 callback_to_run.Run(); | 133 callback_to_run.Run(); |
| 134 } | 134 } |
| OLD | NEW |