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

Side by Side Diff: chrome/utility/chrome_content_utility_client.cc

Issue 252683006: Remove ClosePlatformFile from media galleries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra space Created 6 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
« no previous file with comments | « no previous file | chrome/utility/media_galleries/iapps_xml_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/utility/chrome_content_utility_client.h" 5 #include "chrome/utility/chrome_content_utility_client.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 itunes::FindLibraryLocationInPrefXml(itunes_xml_data)); 938 itunes::FindLibraryLocationInPrefXml(itunes_xml_data));
939 Send(new ChromeUtilityHostMsg_GotITunesDirectory(library_path)); 939 Send(new ChromeUtilityHostMsg_GotITunesDirectory(library_path));
940 ReleaseProcessIfNeeded(); 940 ReleaseProcessIfNeeded();
941 } 941 }
942 #endif // defined(OS_WIN) 942 #endif // defined(OS_WIN)
943 943
944 #if defined(OS_MACOSX) 944 #if defined(OS_MACOSX)
945 void ChromeContentUtilityClient::OnParseIPhotoLibraryXmlFile( 945 void ChromeContentUtilityClient::OnParseIPhotoLibraryXmlFile(
946 const IPC::PlatformFileForTransit& iphoto_library_file) { 946 const IPC::PlatformFileForTransit& iphoto_library_file) {
947 iphoto::IPhotoLibraryParser parser; 947 iphoto::IPhotoLibraryParser parser;
948 base::PlatformFile file = 948 base::File file = IPC::PlatformFileForTransitToFile(iphoto_library_file);
949 IPC::PlatformFileForTransitToPlatformFile(iphoto_library_file); 949 bool result = parser.Parse(iapps::ReadFileAsString(file.Pass()));
950 bool result = parser.Parse(iapps::ReadPlatformFileAsString(file));
951 Send(new ChromeUtilityHostMsg_GotIPhotoLibrary(result, parser.library())); 950 Send(new ChromeUtilityHostMsg_GotIPhotoLibrary(result, parser.library()));
952 ReleaseProcessIfNeeded(); 951 ReleaseProcessIfNeeded();
953 } 952 }
954 #endif // defined(OS_MACOSX) 953 #endif // defined(OS_MACOSX)
955 954
956 #if defined(OS_WIN) || defined(OS_MACOSX) 955 #if defined(OS_WIN) || defined(OS_MACOSX)
957 void ChromeContentUtilityClient::OnParseITunesLibraryXmlFile( 956 void ChromeContentUtilityClient::OnParseITunesLibraryXmlFile(
958 const IPC::PlatformFileForTransit& itunes_library_file) { 957 const IPC::PlatformFileForTransit& itunes_library_file) {
959 itunes::ITunesLibraryParser parser; 958 itunes::ITunesLibraryParser parser;
960 base::PlatformFile file = 959 base::File file = IPC::PlatformFileForTransitToFile(itunes_library_file);
961 IPC::PlatformFileForTransitToPlatformFile(itunes_library_file); 960 bool result = parser.Parse(iapps::ReadFileAsString(file.Pass()));
962 bool result = parser.Parse(iapps::ReadPlatformFileAsString(file));
963 Send(new ChromeUtilityHostMsg_GotITunesLibrary(result, parser.library())); 961 Send(new ChromeUtilityHostMsg_GotITunesLibrary(result, parser.library()));
964 ReleaseProcessIfNeeded(); 962 ReleaseProcessIfNeeded();
965 } 963 }
966 964
967 void ChromeContentUtilityClient::OnParsePicasaPMPDatabase( 965 void ChromeContentUtilityClient::OnParsePicasaPMPDatabase(
968 const picasa::AlbumTableFilesForTransit& album_table_files) { 966 const picasa::AlbumTableFilesForTransit& album_table_files) {
969 picasa::AlbumTableFiles files; 967 picasa::AlbumTableFiles files;
970 files.indicator_file = 968 files.indicator_file =
971 IPC::PlatformFileForTransitToFile(album_table_files.indicator_file); 969 IPC::PlatformFileForTransitToFile(album_table_files.indicator_file);
972 files.category_file = 970 files.category_file =
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 NetworkingPrivateCrypto crypto; 1018 NetworkingPrivateCrypto crypto;
1021 success = crypto.EncryptByteString(public_key, key_data, &ciphertext); 1019 success = crypto.EncryptByteString(public_key, key_data, &ciphertext);
1022 } 1020 }
1023 1021
1024 Send(new ChromeUtilityHostMsg_GotEncryptedWiFiCredentials(ciphertext, 1022 Send(new ChromeUtilityHostMsg_GotEncryptedWiFiCredentials(ciphertext,
1025 success)); 1023 success));
1026 } 1024 }
1027 #endif // defined(OS_WIN) 1025 #endif // defined(OS_WIN)
1028 1026
1029 } // namespace chrome 1027 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/utility/media_galleries/iapps_xml_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698