| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/resources_private/resources_private_api.
h" | 5 #include "chrome/browser/extensions/api/resources_private/resources_private_api.
h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> |
| 8 | 9 |
| 9 #include "base/values.h" | 10 #include "base/values.h" |
| 10 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/common/extensions/api/resources_private.h" | 12 #include "chrome/common/extensions/api/resources_private.h" |
| 12 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
| 13 #include "components/strings/grit/components_strings.h" | 14 #include "components/strings/grit/components_strings.h" |
| 14 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
| 15 #include "ui/base/webui/web_ui_util.h" | 16 #include "ui/base/webui/web_ui_util.h" |
| 16 | 17 |
| 17 // To add a new component to this API, simply: | 18 // To add a new component to this API, simply: |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 case api::resources_private::COMPONENT_PDF: | 73 case api::resources_private::COMPONENT_PDF: |
| 73 AddStringsForPdf(dict.get()); | 74 AddStringsForPdf(dict.get()); |
| 74 break; | 75 break; |
| 75 case api::resources_private::COMPONENT_NONE: | 76 case api::resources_private::COMPONENT_NONE: |
| 76 NOTREACHED(); | 77 NOTREACHED(); |
| 77 } | 78 } |
| 78 | 79 |
| 79 const std::string& app_locale = g_browser_process->GetApplicationLocale(); | 80 const std::string& app_locale = g_browser_process->GetApplicationLocale(); |
| 80 webui::SetLoadTimeDataDefaults(app_locale, dict.get()); | 81 webui::SetLoadTimeDataDefaults(app_locale, dict.get()); |
| 81 | 82 |
| 82 return RespondNow(OneArgument(dict.Pass())); | 83 return RespondNow(OneArgument(std::move(dict))); |
| 83 } | 84 } |
| 84 | 85 |
| 85 } // namespace extensions | 86 } // namespace extensions |
| OLD | NEW |