Index: chrome/browser/importer/in_process_importer_bridge.cc |
diff --git a/chrome/browser/importer/in_process_importer_bridge.cc b/chrome/browser/importer/in_process_importer_bridge.cc |
index 218a72645d3ae0646c00e87c715ad55230cb2433..7b4b3f281214773582966bef49feb8af68350ebc 100644 |
--- a/chrome/browser/importer/in_process_importer_bridge.cc |
+++ b/chrome/browser/importer/in_process_importer_bridge.cc |
@@ -43,6 +43,22 @@ history::URLRows ConvertImporterURLRowsToHistoryURLRows( |
return converted; |
} |
+history::VisitSource ConvertImporterVisitSourceToHistoryVisitSource( |
+ ImporterVisitSource visit_source) { |
+ switch (visit_source) { |
+ case IMPORTER_VISIT_SOURCE_BROWSED: |
+ return history::SOURCE_BROWSED; |
+ case IMPORTER_VISIT_SOURCE_FIREFOX_IMPORTED: |
+ return history::SOURCE_FIREFOX_IMPORTED; |
+ case IMPORTER_VISIT_SOURCE_IE_IMPORTED: |
+ return history::SOURCE_IE_IMPORTED; |
+ case IMPORTER_VISIT_SOURCE_SAFARI_IMPORTED: |
+ return history::SOURCE_SAFARI_IMPORTED; |
+ }; |
+ NOTREACHED(); |
+ return history::SOURCE_SYNCED; |
+} |
+ |
} // namespace |
using content::BrowserThread; |
@@ -187,13 +203,17 @@ void InProcessImporterBridge::SetFavicons( |
void InProcessImporterBridge::SetHistoryItems( |
const std::vector<ImporterURLRow>& rows, |
- history::VisitSource visit_source) { |
- history::URLRows converted = ConvertImporterURLRowsToHistoryURLRows(rows); |
- BrowserThread::PostTask( |
- BrowserThread::UI, |
- FROM_HERE, |
- base::Bind( |
- &ProfileWriter::AddHistoryPage, writer_, converted, visit_source)); |
+ ImporterVisitSource visit_source) { |
gab
2013/07/08 15:18:08
Can you introduce this new ImporterVisitSource in
scottmg
2013/07/09 16:20:49
Done.
|
+ history::URLRows converted_rows = |
+ ConvertImporterURLRowsToHistoryURLRows(rows); |
+ history::VisitSource converted_visit_source = |
+ ConvertImporterVisitSourceToHistoryVisitSource(visit_source); |
+ BrowserThread::PostTask(BrowserThread::UI, |
+ FROM_HERE, |
+ base::Bind(&ProfileWriter::AddHistoryPage, |
+ writer_, |
+ converted_rows, |
+ converted_visit_source)); |
} |
void InProcessImporterBridge::SetKeywords( |