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

Side by Side Diff: chrome/utility/extensions/extensions_handler.cc

Issue 2614063003: [wip-test] Test if any bot test calls utility media IPC (Closed)
Patch Set: Sync up: Test CheckMediaFile only. Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/extensions_handler.h" 5 #include "chrome/utility/extensions/extensions_handler.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 metadata::MediaMetadataParser* /* parser */, 83 metadata::MediaMetadataParser* /* parser */,
84 const extensions::api::media_galleries::MediaMetadata& metadata, 84 const extensions::api::media_galleries::MediaMetadata& metadata,
85 const std::vector<metadata::AttachedImage>& attached_images) { 85 const std::vector<metadata::AttachedImage>& attached_images) {
86 callback.Run(true, metadata.ToValue(), attached_images); 86 callback.Run(true, metadata.ToValue(), attached_images);
87 ReleaseProcessIfNeeded(); 87 ReleaseProcessIfNeeded();
88 } 88 }
89 89
90 void CheckMediaFile(base::TimeDelta decode_time, 90 void CheckMediaFile(base::TimeDelta decode_time,
91 base::File file, 91 base::File file,
92 const CheckMediaFileCallback& callback) override { 92 const CheckMediaFileCallback& callback) override {
93 NOTREACHED(); // HACK to see if any test calls this API
94
93 #if !defined(MEDIA_DISABLE_FFMPEG) 95 #if !defined(MEDIA_DISABLE_FFMPEG)
94 media::MediaFileChecker checker(std::move(file)); 96 media::MediaFileChecker checker(std::move(file));
95 callback.Run(checker.Start(decode_time)); 97 callback.Run(checker.Start(decode_time));
96 #else 98 #else
97 callback.Run(false); 99 callback.Run(false);
98 #endif 100 #endif
99 ReleaseProcessIfNeeded(); 101 ReleaseProcessIfNeeded();
100 } 102 }
101 103
102 ChromeContentUtilityClient* const utility_client_; 104 ChromeContentUtilityClient* const utility_client_;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 picasa::PicasaAlbumsIndexer indexer(album_uids); 257 picasa::PicasaAlbumsIndexer indexer(album_uids);
256 indexer.ParseFolderINI(folders_inis); 258 indexer.ParseFolderINI(folders_inis);
257 content::UtilityThread::Get()->Send( 259 content::UtilityThread::Get()->Send(
258 new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( 260 new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished(
259 indexer.albums_images())); 261 indexer.albums_images()));
260 ReleaseProcessIfNeeded(); 262 ReleaseProcessIfNeeded();
261 } 263 }
262 #endif // defined(OS_WIN) || defined(OS_MACOSX) 264 #endif // defined(OS_WIN) || defined(OS_MACOSX)
263 265
264 } // namespace extensions 266 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698