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

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

Issue 7056033: Style cleanup in bookmarks import code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/external_process_importer_bridge.h" 5 #include "chrome/browser/importer/external_process_importer_bridge.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/history/history_types.h" 11 #include "chrome/browser/history/history_types.h"
12 #include "chrome/profile_import/profile_import_thread.h" 12 #include "chrome/profile_import/profile_import_thread.h"
13 #include "webkit/glue/password_form.h" 13 #include "webkit/glue/password_form.h"
14 14
15 #if defined(OS_WIN) 15 #if defined(OS_WIN)
16 #include "chrome/browser/password_manager/ie7_password.h" 16 #include "chrome/browser/password_manager/ie7_password.h"
17 #endif 17 #endif
18 18
19 ExternalProcessImporterBridge::ExternalProcessImporterBridge( 19 ExternalProcessImporterBridge::ExternalProcessImporterBridge(
20 ProfileImportThread* profile_import_thread, 20 ProfileImportThread* profile_import_thread,
21 const DictionaryValue& localized_strings) 21 const DictionaryValue& localized_strings)
22 : profile_import_thread_(profile_import_thread) { 22 : profile_import_thread_(profile_import_thread) {
23 // Bridge needs to make its own copy because OS 10.6 autoreleases the 23 // Bridge needs to make its own copy because OS 10.6 autoreleases the
24 // localized_strings value that is passed in (see http://crbug.com/46003 ). 24 // localized_strings value that is passed in (see http://crbug.com/46003 ).
25 localized_strings_.reset(localized_strings.DeepCopy()); 25 localized_strings_.reset(localized_strings.DeepCopy());
26 } 26 }
27 27
28 void ExternalProcessImporterBridge::AddBookmarkEntries( 28 void ExternalProcessImporterBridge::AddBookmarks(
29 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks, 29 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks,
30 const string16& first_folder_name, 30 const string16& first_folder_name,
31 int options) { 31 int options) {
32 profile_import_thread_->NotifyBookmarksImportReady( 32 profile_import_thread_->NotifyBookmarksImportReady(bookmarks,
33 bookmarks, first_folder_name, options); 33 first_folder_name,
34 options);
34 } 35 }
35 36
36 void ExternalProcessImporterBridge::AddHomePage(const GURL& home_page) { 37 void ExternalProcessImporterBridge::AddHomePage(const GURL& home_page) {
37 NOTIMPLEMENTED(); 38 NOTIMPLEMENTED();
38 } 39 }
39 40
40 #if defined(OS_WIN) 41 #if defined(OS_WIN)
41 void ExternalProcessImporterBridge::AddIE7PasswordInfo( 42 void ExternalProcessImporterBridge::AddIE7PasswordInfo(
42 const IE7PasswordInfo& password_info) { 43 const IE7PasswordInfo& password_info) {
43 NOTIMPLEMENTED(); 44 NOTIMPLEMENTED();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // The internal process detects import end when all items have been received. 86 // The internal process detects import end when all items have been received.
86 } 87 }
87 88
88 string16 ExternalProcessImporterBridge::GetLocalizedString(int message_id) { 89 string16 ExternalProcessImporterBridge::GetLocalizedString(int message_id) {
89 string16 message; 90 string16 message;
90 localized_strings_->GetString(base::IntToString(message_id), &message); 91 localized_strings_->GetString(base::IntToString(message_id), &message);
91 return message; 92 return message;
92 } 93 }
93 94
94 ExternalProcessImporterBridge::~ExternalProcessImporterBridge() {} 95 ExternalProcessImporterBridge::~ExternalProcessImporterBridge() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698