Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Side by Side Diff: chrome/browser/importer/importer_bridge.cc

Issue 6324004: Made return types of various Value::DeepCopy() implementations more specific (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test for covariant return types Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 InProcessImporterBridge::~InProcessImporterBridge() {} 123 InProcessImporterBridge::~InProcessImporterBridge() {}
124 124
125 ExternalProcessImporterBridge::ExternalProcessImporterBridge( 125 ExternalProcessImporterBridge::ExternalProcessImporterBridge(
126 ProfileImportThread* profile_import_thread, 126 ProfileImportThread* profile_import_thread,
127 const DictionaryValue& localized_strings) 127 const DictionaryValue& localized_strings)
128 : profile_import_thread_(profile_import_thread) { 128 : profile_import_thread_(profile_import_thread) {
129 // Bridge needs to make its own copy because OS 10.6 autoreleases the 129 // Bridge needs to make its own copy because OS 10.6 autoreleases the
130 // localized_strings value that is passed in (see http://crbug.com/46003 ). 130 // localized_strings value that is passed in (see http://crbug.com/46003 ).
131 localized_strings_.reset( 131 localized_strings_.reset(localized_strings.DeepCopy());
132 static_cast<DictionaryValue*>(localized_strings.DeepCopy()));
133 } 132 }
134 133
135 void ExternalProcessImporterBridge::AddBookmarkEntries( 134 void ExternalProcessImporterBridge::AddBookmarkEntries(
136 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks, 135 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks,
137 const std::wstring& first_folder_name, int options) { 136 const std::wstring& first_folder_name, int options) {
138 profile_import_thread_->NotifyBookmarksImportReady(bookmarks, 137 profile_import_thread_->NotifyBookmarksImportReady(bookmarks,
139 first_folder_name, options); 138 first_folder_name, options);
140 } 139 }
141 140
142 void ExternalProcessImporterBridge::AddHomePage(const GURL &home_page) { 141 void ExternalProcessImporterBridge::AddHomePage(const GURL &home_page) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 194
196 // TODO(viettrungluu): convert to string16. 195 // TODO(viettrungluu): convert to string16.
197 std::wstring ExternalProcessImporterBridge::GetLocalizedString( 196 std::wstring ExternalProcessImporterBridge::GetLocalizedString(
198 int message_id) { 197 int message_id) {
199 string16 message; 198 string16 message;
200 localized_strings_->GetString(base::IntToString(message_id), &message); 199 localized_strings_->GetString(base::IntToString(message_id), &message);
201 return UTF16ToWideHack(message); 200 return UTF16ToWideHack(message);
202 } 201 }
203 202
204 ExternalProcessImporterBridge::~ExternalProcessImporterBridge() {} 203 ExternalProcessImporterBridge::~ExternalProcessImporterBridge() {}
OLDNEW
« no previous file with comments | « chrome/browser/extensions/sandboxed_extension_unpacker.cc ('k') | chrome/browser/policy/device_management_policy_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698