| 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 <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 namespace feedback_private = api::feedback_private; | 71 namespace feedback_private = api::feedback_private; |
| 72 | 72 |
| 73 using feedback_private::SystemInformation; | 73 using feedback_private::SystemInformation; |
| 74 using feedback_private::FeedbackInfo; | 74 using feedback_private::FeedbackInfo; |
| 75 using feedback_private::FeedbackFlow; | 75 using feedback_private::FeedbackFlow; |
| 76 | 76 |
| 77 using SystemInformationList = | 77 using SystemInformationList = |
| 78 std::vector<api::feedback_private::SystemInformation>; | 78 std::vector<api::feedback_private::SystemInformation>; |
| 79 | 79 |
| 80 static base::LazyInstance<BrowserContextKeyedAPIFactory<FeedbackPrivateAPI> > | 80 static base::LazyInstance<BrowserContextKeyedAPIFactory<FeedbackPrivateAPI>>:: |
| 81 g_factory = LAZY_INSTANCE_INITIALIZER; | 81 DestructorAtExit g_factory = LAZY_INSTANCE_INITIALIZER; |
| 82 | 82 |
| 83 // static | 83 // static |
| 84 BrowserContextKeyedAPIFactory<FeedbackPrivateAPI>* | 84 BrowserContextKeyedAPIFactory<FeedbackPrivateAPI>* |
| 85 FeedbackPrivateAPI::GetFactoryInstance() { | 85 FeedbackPrivateAPI::GetFactoryInstance() { |
| 86 return g_factory.Pointer(); | 86 return g_factory.Pointer(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 FeedbackPrivateAPI::FeedbackPrivateAPI(content::BrowserContext* context) | 89 FeedbackPrivateAPI::FeedbackPrivateAPI(content::BrowserContext* context) |
| 90 : browser_context_(context), service_(new FeedbackService()) { | 90 : browser_context_(context), service_(new FeedbackService()) { |
| 91 } | 91 } |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 content::RecordAction( | 358 content::RecordAction( |
| 359 base::UserMetricsAction("Feedback.SrtPromptClosed")); | 359 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 |