| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extensions/extension_navigation_observer.h" | 5 #include "chrome/browser/extensions/extension_navigation_observer.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "content/browser/tab_contents/navigation_controller.h" | 9 #include "content/browser/tab_contents/navigation_controller.h" |
| 10 #include "content/browser/tab_contents/navigation_entry.h" | 10 #include "content/browser/tab_contents/navigation_entry.h" |
| 11 #include "content/public/browser/notification_service.h" | 11 #include "content/public/browser/notification_service.h" |
| 12 #include "content/public/browser/notification_types.h" |
| 12 | 13 |
| 13 ExtensionNavigationObserver::ExtensionNavigationObserver(Profile* profile) | 14 ExtensionNavigationObserver::ExtensionNavigationObserver(Profile* profile) |
| 14 : profile_(profile) { | 15 : profile_(profile) { |
| 15 RegisterForNotifications(); | 16 RegisterForNotifications(); |
| 16 } | 17 } |
| 17 | 18 |
| 18 ExtensionNavigationObserver::~ExtensionNavigationObserver() {} | 19 ExtensionNavigationObserver::~ExtensionNavigationObserver() {} |
| 19 | 20 |
| 20 void ExtensionNavigationObserver::Observe( | 21 void ExtensionNavigationObserver::Observe( |
| 21 int type, | 22 int type, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 in_progress_prompt_extension_id_ = ""; | 100 in_progress_prompt_extension_id_ = ""; |
| 100 in_progress_prompt_navigation_controller_ = NULL; | 101 in_progress_prompt_navigation_controller_ = NULL; |
| 101 extension_install_ui_.reset(); | 102 extension_install_ui_.reset(); |
| 102 | 103 |
| 103 std::string histogram_name = user_initiated ? | 104 std::string histogram_name = user_initiated ? |
| 104 "Extensions.Permissions_ReEnableCancel" : | 105 "Extensions.Permissions_ReEnableCancel" : |
| 105 "Extensions.Permissions_ReEnableAbort"; | 106 "Extensions.Permissions_ReEnableAbort"; |
| 106 ExtensionService::RecordPermissionMessagesHistogram( | 107 ExtensionService::RecordPermissionMessagesHistogram( |
| 107 extension, histogram_name.c_str()); | 108 extension, histogram_name.c_str()); |
| 108 } | 109 } |
| OLD | NEW |