| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_message_bubble_controller.h" | 5 #include "chrome/browser/extensions/extension_message_bubble_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/extensions/extension_message_bubble.h" | 10 #include "chrome/browser/extensions/extension_message_bubble.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 user_action_ = ACTION_LEARN_MORE; | 123 user_action_ = ACTION_LEARN_MORE; |
| 124 | 124 |
| 125 delegate_->LogAction(ACTION_LEARN_MORE); | 125 delegate_->LogAction(ACTION_LEARN_MORE); |
| 126 Browser* browser = | 126 Browser* browser = |
| 127 chrome::FindBrowserWithProfile(profile_, chrome::GetActiveDesktop()); | 127 chrome::FindBrowserWithProfile(profile_, chrome::GetActiveDesktop()); |
| 128 if (browser) { | 128 if (browser) { |
| 129 browser->OpenURL( | 129 browser->OpenURL( |
| 130 content::OpenURLParams(delegate_->GetLearnMoreUrl(), | 130 content::OpenURLParams(delegate_->GetLearnMoreUrl(), |
| 131 content::Referrer(), | 131 content::Referrer(), |
| 132 NEW_FOREGROUND_TAB, | 132 NEW_FOREGROUND_TAB, |
| 133 content::PAGE_TRANSITION_LINK, | 133 ui::PAGE_TRANSITION_LINK, |
| 134 false)); | 134 false)); |
| 135 } | 135 } |
| 136 AcknowledgeExtensions(); | 136 AcknowledgeExtensions(); |
| 137 delegate_->OnClose(); | 137 delegate_->OnClose(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void ExtensionMessageBubbleController::AcknowledgeExtensions() { | 140 void ExtensionMessageBubbleController::AcknowledgeExtensions() { |
| 141 ExtensionIdList* list = GetOrCreateExtensionList(); | 141 ExtensionIdList* list = GetOrCreateExtensionList(); |
| 142 for (ExtensionIdList::const_iterator it = list->begin(); | 142 for (ExtensionIdList::const_iterator it = list->begin(); |
| 143 it != list->end(); ++it) | 143 it != list->end(); ++it) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 157 } | 157 } |
| 158 | 158 |
| 159 delegate_->LogExtensionCount(extension_list_.size()); | 159 delegate_->LogExtensionCount(extension_list_.size()); |
| 160 initialized_ = true; | 160 initialized_ = true; |
| 161 } | 161 } |
| 162 | 162 |
| 163 return &extension_list_; | 163 return &extension_list_; |
| 164 } | 164 } |
| 165 | 165 |
| 166 } // namespace extensions | 166 } // namespace extensions |
| OLD | NEW |