| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/api/feedback_private/feedback_private_api.h" | 5 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 const bool use_system_window_frame = true; | 140 const bool use_system_window_frame = true; |
| 141 #else | 141 #else |
| 142 const bool use_system_window_frame = false; | 142 const bool use_system_window_frame = false; |
| 143 #endif | 143 #endif |
| 144 info.use_system_window_frame = | 144 info.use_system_window_frame = |
| 145 base::MakeUnique<bool>(use_system_window_frame); | 145 base::MakeUnique<bool>(use_system_window_frame); |
| 146 | 146 |
| 147 std::unique_ptr<base::ListValue> args = | 147 std::unique_ptr<base::ListValue> args = |
| 148 feedback_private::OnFeedbackRequested::Create(info); | 148 feedback_private::OnFeedbackRequested::Create(info); |
| 149 | 149 |
| 150 std::unique_ptr<Event> event(new Event( | 150 auto event = base::MakeUnique<Event>( |
| 151 events::FEEDBACK_PRIVATE_ON_FEEDBACK_REQUESTED, | 151 events::FEEDBACK_PRIVATE_ON_FEEDBACK_REQUESTED, |
| 152 feedback_private::OnFeedbackRequested::kEventName, std::move(args))); | 152 feedback_private::OnFeedbackRequested::kEventName, std::move(args), |
| 153 event->restrict_to_browser_context = browser_context_; | 153 browser_context_); |
| 154 | 154 |
| 155 EventRouter::Get(browser_context_) | 155 EventRouter::Get(browser_context_) |
| 156 ->DispatchEventToExtension(extension_misc::kFeedbackExtensionId, | 156 ->DispatchEventToExtension(extension_misc::kFeedbackExtensionId, |
| 157 std::move(event)); | 157 std::move(event)); |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 | 160 |
| 161 // static | 161 // static |
| 162 base::Closure* FeedbackPrivateGetStringsFunction::test_callback_ = NULL; | 162 base::Closure* FeedbackPrivateGetStringsFunction::test_callback_ = NULL; |
| 163 | 163 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 case feedback_private::SRT_PROMPT_RESULT_CLOSED: | 358 case feedback_private::SRT_PROMPT_RESULT_CLOSED: |
| 359 base::RecordAction(base::UserMetricsAction("Feedback.SrtPromptClosed")); | 359 base::RecordAction(base::UserMetricsAction("Feedback.SrtPromptClosed")); |
| 360 break; | 360 break; |
| 361 default: | 361 default: |
| 362 return RespondNow(Error("Invalid arugment.")); | 362 return RespondNow(Error("Invalid arugment.")); |
| 363 } | 363 } |
| 364 return RespondNow(NoArguments()); | 364 return RespondNow(NoArguments()); |
| 365 } | 365 } |
| 366 | 366 |
| 367 } // namespace extensions | 367 } // namespace extensions |
| OLD | NEW |