Skip to content

Commit

Permalink
Merge pull request #6904 from brave/greaselion-browser-version-fix
Browse files Browse the repository at this point in the history
Test against Brave version number without Chromium major version
  • Loading branch information
emerick authored Oct 21, 2020
2 parents fab23ce + 2314bde commit 119bd75
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions components/greaselion/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ source_set("browser") {

deps = [
"//base",
"//brave/browser:version_info",
"//brave/components/brave_component_updater/browser",
"//chrome/browser/extensions:extensions",
"//components/version_info",
Expand Down
2 changes: 1 addition & 1 deletion components/greaselion/browser/greaselion_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class GreaselionService : public KeyedService,

private:
friend class ::GreaselionServiceTest;
virtual void SetBrowserVersionForTesting(const base::Version& version);
virtual void SetBrowserVersionForTesting(const base::Version& version) = 0;
DISALLOW_COPY_AND_ASSIGN(GreaselionService);
};

Expand Down
4 changes: 3 additions & 1 deletion components/greaselion/browser/greaselion_service_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "base/task_runner_util.h"
#include "base/values.h"
#include "base/version.h"
#include "brave/browser/version_info.h"
#include "brave/components/brave_component_updater/browser/features.h"
#include "brave/components/brave_component_updater/browser/switches.h"
#include "brave/components/greaselion/browser/greaselion_download_service.h"
Expand Down Expand Up @@ -197,7 +198,8 @@ GreaselionServiceImpl::GreaselionServiceImpl(
update_pending_(false),
pending_installs_(0),
task_runner_(std::move(task_runner)),
browser_version_(version_info::GetVersion()),
browser_version_(
version_info::GetBraveVersionWithoutChromiumMajorVersion()),
weak_factory_(this) {
extension_registry_->AddObserver(this);
for (int i = FIRST_FEATURE; i != LAST_FEATURE; i++)
Expand Down

0 comments on commit 119bd75

Please sign in to comment.