| 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 "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 ExtensionSystem::Get(profile_)->event_router()->BroadcastEvent( | 64 ExtensionSystem::Get(profile_)->event_router()->BroadcastEvent( |
| 65 event.Pass()); | 65 event.Pass()); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 bool FeedbackPrivateGetUserEmailFunction::RunImpl() { | 69 bool FeedbackPrivateGetUserEmailFunction::RunImpl() { |
| 70 FeedbackService* service = | 70 FeedbackService* service = |
| 71 FeedbackPrivateAPI::GetFactoryInstance()->GetForProfile( | 71 FeedbackPrivateAPI::GetFactoryInstance()->GetForProfile( |
| 72 profile())->GetService(); | 72 profile())->GetService(); |
| 73 DCHECK(service); | 73 DCHECK(service); |
| 74 SetResult(base::Value::CreateStringValue(service->GetUserEmail())); | 74 SetResult(new base::StringValue(service->GetUserEmail())); |
| 75 return true; | 75 return true; |
| 76 } | 76 } |
| 77 | 77 |
| 78 bool FeedbackPrivateGetSystemInformationFunction::RunImpl() { | 78 bool FeedbackPrivateGetSystemInformationFunction::RunImpl() { |
| 79 FeedbackService* service = | 79 FeedbackService* service = |
| 80 FeedbackPrivateAPI::GetFactoryInstance()->GetForProfile( | 80 FeedbackPrivateAPI::GetFactoryInstance()->GetForProfile( |
| 81 profile())->GetService(); | 81 profile())->GetService(); |
| 82 DCHECK(service); | 82 DCHECK(service); |
| 83 service->GetSystemInformation( | 83 service->GetSystemInformation( |
| 84 base::Bind( | 84 base::Bind( |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 void FeedbackPrivateSendFeedbackFunction::OnCompleted( | 161 void FeedbackPrivateSendFeedbackFunction::OnCompleted( |
| 162 bool success) { | 162 bool success) { |
| 163 results_ = api::feedback_private::SendFeedback::Results::Create( | 163 results_ = api::feedback_private::SendFeedback::Results::Create( |
| 164 success ? api::feedback_private::STATUS_SUCCESS : | 164 success ? api::feedback_private::STATUS_SUCCESS : |
| 165 api::feedback_private::STATUS_DELAYED); | 165 api::feedback_private::STATUS_DELAYED); |
| 166 SendResponse(true); | 166 SendResponse(true); |
| 167 } | 167 } |
| 168 | 168 |
| 169 } // namespace extensions | 169 } // namespace extensions |
| OLD | NEW |