| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // This code glues the RLZ library DLL with Chrome. It allows Chrome to work | 5 // This code glues the RLZ library DLL with Chrome. It allows Chrome to work |
| 6 // with or without the DLL being present. If the DLL is not present the | 6 // with or without the DLL being present. If the DLL is not present the |
| 7 // functions do nothing and just return false. | 7 // functions do nothing and just return false. |
| 8 | 8 |
| 9 #include "chrome/browser/rlz/rlz.h" | 9 #include "chrome/browser/rlz/rlz.h" |
| 10 | 10 |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 RecordFirstSearch(ChromeOmnibox()); | 419 RecordFirstSearch(ChromeOmnibox()); |
| 420 registrar_.Remove(this, chrome::NOTIFICATION_OMNIBOX_OPENED_URL, | 420 registrar_.Remove(this, chrome::NOTIFICATION_OMNIBOX_OPENED_URL, |
| 421 content::NotificationService::AllSources()); | 421 content::NotificationService::AllSources()); |
| 422 break; | 422 break; |
| 423 #if !defined(OS_IOS) | 423 #if !defined(OS_IOS) |
| 424 case content::NOTIFICATION_NAV_ENTRY_PENDING: { | 424 case content::NOTIFICATION_NAV_ENTRY_PENDING: { |
| 425 const NavigationEntry* entry = | 425 const NavigationEntry* entry = |
| 426 content::Details<content::NavigationEntry>(details).ptr(); | 426 content::Details<content::NavigationEntry>(details).ptr(); |
| 427 if (entry != NULL && | 427 if (entry != NULL && |
| 428 ((entry->GetTransitionType() & | 428 ((entry->GetTransitionType() & |
| 429 content::PAGE_TRANSITION_HOME_PAGE) != 0)) { | 429 ui::PAGE_TRANSITION_HOME_PAGE) != 0)) { |
| 430 RecordFirstSearch(ChromeHomePage()); | 430 RecordFirstSearch(ChromeHomePage()); |
| 431 registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING, | 431 registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING, |
| 432 content::NotificationService::AllSources()); | 432 content::NotificationService::AllSources()); |
| 433 } | 433 } |
| 434 break; | 434 break; |
| 435 } | 435 } |
| 436 #endif // !defined(OS_IOS) | 436 #endif // !defined(OS_IOS) |
| 437 default: | 437 default: |
| 438 NOTREACHED(); | 438 NOTREACHED(); |
| 439 break; | 439 break; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 void RLZTracker::EnableZeroDelayForTesting() { | 630 void RLZTracker::EnableZeroDelayForTesting() { |
| 631 GetInstance()->min_init_delay_ = base::TimeDelta(); | 631 GetInstance()->min_init_delay_ = base::TimeDelta(); |
| 632 } | 632 } |
| 633 | 633 |
| 634 #if !defined(OS_IOS) | 634 #if !defined(OS_IOS) |
| 635 // static | 635 // static |
| 636 void RLZTracker::RecordAppListSearch() { | 636 void RLZTracker::RecordAppListSearch() { |
| 637 GetInstance()->RecordFirstSearch(RLZTracker::ChromeAppList()); | 637 GetInstance()->RecordFirstSearch(RLZTracker::ChromeAppList()); |
| 638 } | 638 } |
| 639 #endif | 639 #endif |
| OLD | NEW |