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

Side by Side Diff: chrome/utility/importer/firefox_importer_unittest_utils.h

Issue 2361203002: Remove calls to MessageLoop::Run/RunUntilIdle. (Closed)
Patch Set: CR jochen #6 Created 4 years, 2 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
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 #ifndef CHROME_UTILITY_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_ 5 #ifndef CHROME_UTILITY_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_
6 #define CHROME_UTILITY_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_ 6 #define CHROME_UTILITY_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 bool DecryptorInit(const base::FilePath& dll_path, 48 bool DecryptorInit(const base::FilePath& dll_path,
49 const base::FilePath& db_path); 49 const base::FilePath& db_path);
50 base::string16 Decrypt(const std::string& crypt); 50 base::string16 Decrypt(const std::string& crypt);
51 std::vector<autofill::PasswordForm> ParseSignons( 51 std::vector<autofill::PasswordForm> ParseSignons(
52 const base::FilePath& signons_path); 52 const base::FilePath& signons_path);
53 53
54 private: 54 private:
55 #if defined(OS_MACOSX) 55 #if defined(OS_MACOSX)
56 // Blocks until either a timeout is reached, or until the client process 56 // Blocks until either a timeout is reached, or until the client process
57 // responds to an IPC message. 57 // responds to an IPC message.
58 // Returns true if a reply was received successfully and false if the 58 void WaitForClientResponse();
59 // the operation timed out.
60 bool WaitForClientResponse();
61 59
62 base::Process child_process_; 60 base::Process child_process_;
63 std::unique_ptr<IPC::Channel> channel_; 61 std::unique_ptr<IPC::Channel> channel_;
64 std::unique_ptr<FFDecryptorServerChannelListener> listener_; 62 std::unique_ptr<FFDecryptorServerChannelListener> listener_;
65 std::unique_ptr<base::MessageLoopForIO> message_loop_; 63 std::unique_ptr<base::MessageLoopForIO> message_loop_;
66 #else 64 #else
67 NSSDecryptor decryptor_; 65 NSSDecryptor decryptor_;
68 #endif // !OS_MACOSX 66 #endif // !OS_MACOSX
69 DISALLOW_COPY_AND_ASSIGN(FFUnitTestDecryptorProxy); 67 DISALLOW_COPY_AND_ASSIGN(FFUnitTestDecryptorProxy);
70 }; 68 };
(...skipping 25 matching lines...) Expand all
96 std::vector<autofill::PasswordForm> signons; 94 std::vector<autofill::PasswordForm> signons;
97 if (decryptor_.ReadAndParseSignons(signons_path, &signons)) 95 if (decryptor_.ReadAndParseSignons(signons_path, &signons))
98 return signons; 96 return signons;
99 97
100 return std::vector<autofill::PasswordForm>(); 98 return std::vector<autofill::PasswordForm>();
101 } 99 }
102 100
103 #endif // !OS_MACOSX 101 #endif // !OS_MACOSX
104 102
105 #endif // CHROME_UTILITY_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_ 103 #endif // CHROME_UTILITY_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698