Adapt code style

This commit is contained in:
Adrien Fery 2017-12-02 10:59:13 +01:00 committed by Cheng Zhao
parent 329fddaed1
commit eb2520488f
4 changed files with 15 additions and 20 deletions

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_UI_IN_APP_PURCHASE_H_
#define ATOM_BROWSER_UI_IN_APP_PURCHASE_H_
#ifndef ATOM_BROWSER_IN_APP_PURCHASE_H_
#define ATOM_BROWSER_IN_APP_PURCHASE_H_
#include <string>
@ -27,4 +27,4 @@ void PurchaseProduct(const std::string& productID,
} // namespace in_app_purchase
#endif // ATOM_BROWSER_UI_IN_APP_PURCHASE_H_
#endif // ATOM_BROWSER_IN_APP_PURCHASE_H_

View file

@ -112,8 +112,10 @@
* @param product - The product to purchase.
*/
- (void)runCallback:(bool)isProductValid {
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
base::Bind(callback_, isProductValid));
if (callback_) {
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
base::Bind(callback_, isProductValid));
}
}
@end

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_UI_IN_APP_PURCHASE_OBSERVER_H_
#define ATOM_BROWSER_UI_IN_APP_PURCHASE_OBSERVER_H_
#ifndef ATOM_BROWSER_IN_APP_PURCHASE_OBSERVER_H_
#define ATOM_BROWSER_IN_APP_PURCHASE_OBSERVER_H_
#include <string>
@ -38,4 +38,4 @@ void AddTransactionObserver(const InAppTransactionCallback& callback);
} // namespace in_app_purchase
#endif // ATOM_BROWSER_UI_IN_APP_PURCHASE_OBSERVER_H_
#endif // ATOM_BROWSER_IN_APP_PURCHASE_OBSERVER_H_