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

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

Issue 293013: Deprecate PathService::Get(..., wstring*) and use FilePath instead. (Closed)
Patch Set: Created 11 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_BROWSER_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_ 5 #ifndef CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_
6 #define CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_ 6 #define CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 16 matching lines...) Expand all
27 // 27 //
28 // -> Msg_Decryptor_Init(dll_path, db_path) 28 // -> Msg_Decryptor_Init(dll_path, db_path)
29 // <- Msg_Decryptor_InitReturnCode(bool) 29 // <- Msg_Decryptor_InitReturnCode(bool)
30 class FFUnitTestDecryptorProxy { 30 class FFUnitTestDecryptorProxy {
31 public: 31 public:
32 FFUnitTestDecryptorProxy(); 32 FFUnitTestDecryptorProxy();
33 virtual ~FFUnitTestDecryptorProxy(); 33 virtual ~FFUnitTestDecryptorProxy();
34 34
35 // Initialize a decryptor, returns true if the object was 35 // Initialize a decryptor, returns true if the object was
36 // constructed successfully. 36 // constructed successfully.
37 bool Setup(std::wstring& nss_path); 37 bool Setup(const std::wstring& nss_path);
38 38
39 // This match the parallel functions in NSSDecryptor. 39 // This match the parallel functions in NSSDecryptor.
40 bool DecryptorInit(const std::wstring& dll_path, const std::wstring& db_path); 40 bool DecryptorInit(const std::wstring& dll_path, const std::wstring& db_path);
41 std::wstring Decrypt(const std::string& crypt); 41 std::wstring Decrypt(const std::string& crypt);
42 42
43 private: 43 private:
44 #if defined(OS_MACOSX) 44 #if defined(OS_MACOSX)
45 // Blocks until either a timeout is reached, or until the client process 45 // Blocks until either a timeout is reached, or until the client process
46 // responds to an IPC message. 46 // responds to an IPC message.
47 // Returns true if a reply was recieved successfully and false if the 47 // Returns true if a reply was recieved successfully and false if the
(...skipping 12 matching lines...) Expand all
60 60
61 // On Non-OSX platforms FFUnitTestDecryptorProxy simply calls through to 61 // On Non-OSX platforms FFUnitTestDecryptorProxy simply calls through to
62 // NSSDecryptor. 62 // NSSDecryptor.
63 #if !defined(OS_MACOSX) 63 #if !defined(OS_MACOSX)
64 FFUnitTestDecryptorProxy::FFUnitTestDecryptorProxy() { 64 FFUnitTestDecryptorProxy::FFUnitTestDecryptorProxy() {
65 } 65 }
66 66
67 FFUnitTestDecryptorProxy::~FFUnitTestDecryptorProxy() { 67 FFUnitTestDecryptorProxy::~FFUnitTestDecryptorProxy() {
68 } 68 }
69 69
70 bool FFUnitTestDecryptorProxy::Setup(std::wstring& /* nss_path */) { 70 bool FFUnitTestDecryptorProxy::Setup(const std::wstring& /* nss_path */) {
71 return true; 71 return true;
72 } 72 }
73 73
74 bool FFUnitTestDecryptorProxy::DecryptorInit(const std::wstring& dll_path, 74 bool FFUnitTestDecryptorProxy::DecryptorInit(const std::wstring& dll_path,
75 const std::wstring& db_path) { 75 const std::wstring& db_path) {
76 return decryptor_.Init(dll_path, db_path); 76 return decryptor_.Init(dll_path, db_path);
77 } 77 }
78 78
79 std::wstring FFUnitTestDecryptorProxy::Decrypt(const std::string& crypt) { 79 std::wstring FFUnitTestDecryptorProxy::Decrypt(const std::string& crypt) {
80 return decryptor_.Decrypt(crypt); 80 return decryptor_.Decrypt(crypt);
81 } 81 }
82 #endif // !OS_MACOSX 82 #endif // !OS_MACOSX
83 83
84 #endif // CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_ 84 #endif // CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UNITTEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698