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/browser/media_galleries/fileapi/safe_picasa_album_table_reader.
h" | 5 #include "chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.
h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 base::Bind(&SafePicasaAlbumTableReader::StartWorkOnIOThread, this)); | 58 base::Bind(&SafePicasaAlbumTableReader::StartWorkOnIOThread, this)); |
59 } | 59 } |
60 | 60 |
61 SafePicasaAlbumTableReader::~SafePicasaAlbumTableReader() { | 61 SafePicasaAlbumTableReader::~SafePicasaAlbumTableReader() { |
62 } | 62 } |
63 | 63 |
64 void SafePicasaAlbumTableReader::StartWorkOnIOThread() { | 64 void SafePicasaAlbumTableReader::StartWorkOnIOThread() { |
65 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 65 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
66 DCHECK_EQ(INITIAL_STATE, parser_state_); | 66 DCHECK_EQ(INITIAL_STATE, parser_state_); |
67 | 67 |
68 utility_process_host_ = content::UtilityProcessHost::Create( | 68 utility_process_host_ = |
69 this, | 69 content::UtilityProcessHost::Create( |
70 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get()) | 70 this, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get()) |
71 ->AsWeakPtr(); | 71 ->AsWeakPtr(); |
72 utility_process_host_->SetName(l10n_util::GetStringUTF16( | 72 utility_process_host_->SetName(l10n_util::GetStringUTF16( |
73 IDS_UTILITY_PROCESS_MEDIA_LIBRARY_FILE_CHECKER_NAME)); | 73 IDS_UTILITY_PROCESS_MEDIA_LIBRARY_FILE_CHECKER_NAME)); |
74 | 74 |
75 AlbumTableFilesForTransit files_for_transit; | 75 AlbumTableFilesForTransit files_for_transit; |
76 files_for_transit.indicator_file = IPC::TakePlatformFileForTransit( | 76 files_for_transit.indicator_file = IPC::TakePlatformFileForTransit( |
77 std::move(album_table_files_.indicator_file)); | 77 std::move(album_table_files_.indicator_file)); |
78 files_for_transit.category_file = IPC::TakePlatformFileForTransit( | 78 files_for_transit.category_file = IPC::TakePlatformFileForTransit( |
79 std::move(album_table_files_.category_file)); | 79 std::move(album_table_files_.category_file)); |
80 files_for_transit.date_file = | 80 files_for_transit.date_file = |
81 IPC::TakePlatformFileForTransit(std::move(album_table_files_.date_file)); | 81 IPC::TakePlatformFileForTransit(std::move(album_table_files_.date_file)); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 bool handled = true; | 117 bool handled = true; |
118 IPC_BEGIN_MESSAGE_MAP(SafePicasaAlbumTableReader, message) | 118 IPC_BEGIN_MESSAGE_MAP(SafePicasaAlbumTableReader, message) |
119 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished, | 119 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished, |
120 OnParsePicasaPMPDatabaseFinished) | 120 OnParsePicasaPMPDatabaseFinished) |
121 IPC_MESSAGE_UNHANDLED(handled = false) | 121 IPC_MESSAGE_UNHANDLED(handled = false) |
122 IPC_END_MESSAGE_MAP() | 122 IPC_END_MESSAGE_MAP() |
123 return handled; | 123 return handled; |
124 } | 124 } |
125 | 125 |
126 } // namespace picasa | 126 } // namespace picasa |
OLD | NEW |