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/renderer/extensions/extension_localization_peer.h" | 5 #include "chrome/renderer/extensions/extension_localization_peer.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
10 #include "extensions/common/constants.h" | 10 #include "extensions/common/constants.h" |
11 #include "extensions/common/extension_messages.h" | 11 #include "extensions/common/extension_messages.h" |
12 #include "extensions/common/message_bundle.h" | 12 #include "extensions/common/message_bundle.h" |
13 #include "grit/generated_resources.h" | |
14 #include "ipc/ipc_sender.h" | 13 #include "ipc/ipc_sender.h" |
15 #include "net/base/net_errors.h" | 14 #include "net/base/net_errors.h" |
16 #include "net/http/http_response_headers.h" | 15 #include "net/http/http_response_headers.h" |
17 | 16 |
18 ExtensionLocalizationPeer::ExtensionLocalizationPeer( | 17 ExtensionLocalizationPeer::ExtensionLocalizationPeer( |
19 content::RequestPeer* peer, | 18 content::RequestPeer* peer, |
20 IPC::Sender* message_sender, | 19 IPC::Sender* message_sender, |
21 const GURL& request_url) | 20 const GURL& request_url) |
22 : original_peer_(peer), | 21 : original_peer_(peer), |
23 message_sender_(message_sender), | 22 message_sender_(message_sender), |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 121 |
123 l10n_messages = extensions::GetL10nMessagesMap(extension_id); | 122 l10n_messages = extensions::GetL10nMessagesMap(extension_id); |
124 } | 123 } |
125 | 124 |
126 std::string error; | 125 std::string error; |
127 if (extensions::MessageBundle::ReplaceMessagesWithExternalDictionary( | 126 if (extensions::MessageBundle::ReplaceMessagesWithExternalDictionary( |
128 *l10n_messages, &data_, &error)) { | 127 *l10n_messages, &data_, &error)) { |
129 data_.resize(data_.size()); | 128 data_.resize(data_.size()); |
130 } | 129 } |
131 } | 130 } |
OLD | NEW |