-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add
brave_payments_enabled
flag and disable on windows for now
- Loading branch information
Showing
6 changed files
with
105 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
#include "brave/browser/payments/payments_service_impl.h" | ||
|
||
#include "bat/ledger/ledger.h" | ||
|
||
namespace payments { | ||
|
||
PaymentsServiceImpl::PaymentsServiceImpl() : | ||
ledger_(new braveledger_ledger::Ledger()) { | ||
} | ||
|
||
PaymentsServiceImpl::~PaymentsServiceImpl() { | ||
} | ||
|
||
void PaymentsServiceImpl::CreateWallet() { | ||
ledger_->createWallet(); | ||
} | ||
|
||
void PaymentsServiceImpl::Shutdown() { | ||
ledger_.reset(); | ||
PaymentsService::Shutdown(); | ||
} | ||
} // namespace history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef BRAVE_BROWSER_PAYMENTS_PAYMENTS_SERVICE_IMPL_ | ||
#define BRAVE_BROWSER_PAYMENTS_PAYMENTS_SERVICE_IMPL_ | ||
|
||
#include <memory> | ||
|
||
#include "brave/browser/payments/payments_service.h" | ||
|
||
namespace braveledger_ledger { | ||
class Ledger; | ||
} | ||
|
||
namespace payments { | ||
|
||
class PaymentsServiceImpl : public PaymentsService { | ||
public: | ||
PaymentsServiceImpl(); | ||
~PaymentsServiceImpl() override; | ||
|
||
// KeyedService: | ||
void Shutdown() override; | ||
|
||
void CreateWallet() override; | ||
|
||
private: | ||
std::unique_ptr<braveledger_ledger::Ledger> ledger_; | ||
|
||
DISALLOW_COPY_AND_ASSIGN(PaymentsServiceImpl); | ||
}; | ||
|
||
} // namespace history | ||
|
||
#endif // BRAVE_BROWSER_PAYMENTS_PAYMENTS_SERVICE_IMPL_ |