| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chrome_template_url_service_client.h" | 5 #include "chrome/browser/search_engines/chrome_template_url_service_client.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/history/history_service.h" | 8 #include "chrome/browser/history/history_service.h" |
| 9 #include "chrome/browser/history/history_service_factory.h" | 9 #include "chrome/browser/history/history_service_factory.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/search_engines/template_url_service.h" | 11 #include "components/search_engines/template_url_service.h" |
| 12 #include "content/public/browser/notification_details.h" | 12 #include "content/public/browser/notification_details.h" |
| 13 #include "content/public/browser/notification_source.h" | 13 #include "content/public/browser/notification_source.h" |
| 14 | 14 |
| 15 ChromeTemplateURLServiceClient::ChromeTemplateURLServiceClient(Profile* profile) | 15 ChromeTemplateURLServiceClient::ChromeTemplateURLServiceClient(Profile* profile) |
| 16 : profile_(profile), | 16 : profile_(profile), |
| 17 owner_(NULL) { | 17 owner_(NULL) { |
| 18 DCHECK(profile); | 18 DCHECK(profile); |
| 19 | 19 |
| 20 // Register for notifications. | 20 // Register for notifications. |
| 21 // TODO(sky): bug 1166191. The keywords should be moved into the history | 21 // TODO(sky): bug 1166191. The keywords should be moved into the history |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 return; | 73 return; |
| 74 | 74 |
| 75 content::Details<history::URLVisitedDetails> history_details(details); | 75 content::Details<history::URLVisitedDetails> history_details(details); |
| 76 TemplateURLService::URLVisitedDetails visited_details; | 76 TemplateURLService::URLVisitedDetails visited_details; |
| 77 visited_details.url = history_details->row.url(); | 77 visited_details.url = history_details->row.url(); |
| 78 visited_details.is_keyword_transition = | 78 visited_details.is_keyword_transition = |
| 79 content::PageTransitionStripQualifier(history_details->transition) == | 79 content::PageTransitionStripQualifier(history_details->transition) == |
| 80 content::PAGE_TRANSITION_KEYWORD; | 80 content::PAGE_TRANSITION_KEYWORD; |
| 81 owner_->OnHistoryURLVisited(visited_details); | 81 owner_->OnHistoryURLVisited(visited_details); |
| 82 } | 82 } |
| OLD | NEW |