Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brave now builds if brave_rewards_enabled is false #2462

Merged
merged 1 commit into from
May 20, 2019

Conversation

jasonrsadler
Copy link
Contributor

Fixes brave/brave-browser#4069

Submitter Checklist:

Test Plan:

  1. Modify components/brave_rewards/browser/buildflags/buildflags.gni from
import("//build/config/features.gni")

declare_args() {
  brave_rewards_enabled = is_mac || is_linux || is_win || is_android
}

to

import("//build/config/features.gni")

declare_args() {
  brave_rewards_enabled = false
}
  1. Run npm run build and make sure build is successful
  2. Run npm start and make sure Brave runs with Rewards disabled without errors
  3. Run npm run test -- brave_unit_tests && npm run test -- brave_browser_tests and make sure all tests pass
  4. Change buildflags.gni back to original state and repeat steps 2-4 with step 3 ensuring that Rewards functions correctly

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.


#include "brave/components/brave_extension/grit/brave_extension_generated_map.h"
#include "brave/components/brave_extension/grit/brave_extension_resources_map.h"
#if BUILDFLAG(BRAVE_REWARDS_ENABLED)
Copy link
Member

@simonhong simonhong May 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: There is an implicit convention in chromium about header inclusion in guard.
Usually they are positioned at last like below.

#include "ui/views/widget/tooltip_manager.h"
#include "ui/views/widget/widget.h"

#if defined(OS_WIN)
#include "base/win/scoped_gdi_object.h"
#include "ui/native_theme/native_theme_win.h"
#endif

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -7,7 +7,10 @@
#include "brave/browser/ui/views/location_bar/brave_location_bar_view.h"
#include "brave/common/extensions/extension_constants.h"
#include "brave/common/pref_names.h"
#include "brave/components/brave_rewards/browser/buildflags/buildflags.h"
#if BUILDFLAG(BRAVE_REWARDS_ENABLED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sebionofrei
Copy link

FYI, this is no longer working :)

@tmancey
Copy link
Collaborator

tmancey commented Jul 7, 2021

@sebionofrei can you please raise a new issue, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build fails with brave_rewards_enabled set to false
6 participants