OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/importer/importer_bridge.h" | 5 #include "chrome/browser/importer/importer_bridge.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "base/string16.h" |
9 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
10 #include "base/values.h" | 11 #include "base/values.h" |
11 #include "chrome/browser/chrome_thread.h" | 12 #include "chrome/browser/chrome_thread.h" |
12 #include "chrome/browser/history/history_types.h" | 13 #include "chrome/browser/history/history_types.h" |
13 #include "chrome/browser/importer/importer.h" | 14 #include "chrome/browser/importer/importer.h" |
14 #if defined(OS_WIN) | 15 #if defined(OS_WIN) |
15 #include "chrome/browser/password_manager/ie7_password.h" | 16 #include "chrome/browser/password_manager/ie7_password.h" |
16 #endif | 17 #endif |
17 #include "chrome/common/child_thread.h" | 18 #include "chrome/common/child_thread.h" |
18 #include "chrome/browser/importer/importer_messages.h" | 19 #include "chrome/browser/importer/importer_messages.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 } | 176 } |
176 | 177 |
177 void ExternalProcessImporterBridge::NotifyStarted() { | 178 void ExternalProcessImporterBridge::NotifyStarted() { |
178 profile_import_thread_->NotifyStarted(); | 179 profile_import_thread_->NotifyStarted(); |
179 } | 180 } |
180 | 181 |
181 void ExternalProcessImporterBridge::NotifyEnded() { | 182 void ExternalProcessImporterBridge::NotifyEnded() { |
182 // The internal process detects import end when all items have been received. | 183 // The internal process detects import end when all items have been received. |
183 } | 184 } |
184 | 185 |
| 186 // TODO(viettrungluu): convert to string16. |
185 std::wstring ExternalProcessImporterBridge::GetLocalizedString( | 187 std::wstring ExternalProcessImporterBridge::GetLocalizedString( |
186 int message_id) { | 188 int message_id) { |
187 std::wstring message; | 189 string16 message; |
188 localized_strings_->GetString(ASCIIToWide(base::IntToString(message_id)), | 190 localized_strings_->GetString(base::IntToString(message_id), &message); |
189 &message); | 191 return UTF16ToWideHack(message); |
190 return message; | |
191 } | 192 } |
192 | |
OLD | NEW |