Skip to content

Commit

Permalink
fix auto-merge error
Browse files Browse the repository at this point in the history
  • Loading branch information
yrliou committed Oct 2, 2019
1 parent 2861828 commit 1db5505
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
37 changes: 18 additions & 19 deletions browser/brave_browser_main_parts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#if BUILDFLAG(ENABLE_TOR)
#include "base/files/file_util.h"
#include "brave/common/tor/tor_constants.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_impl.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/profiles/profile_metrics.h"
Expand All @@ -20,13 +19,30 @@
#if !defined(OS_ANDROID)
#include "brave/browser/infobars/brave_confirm_p3a_infobar_delegate.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "content/public/browser/web_contents.h"
#endif

#if BUILDFLAG(ENABLE_TOR) || !defined(OS_ANDROID)
#include "chrome/browser/browser_process.h"
#endif

void BraveBrowserMainParts::PostBrowserStart() {
ChromeBrowserMainParts::PostBrowserStart();

#if BUILDFLAG(ENABLE_TOR)
ProfileManager* profile_manager = g_browser_process->profile_manager();
base::FilePath tor_legacy_path =
profile_manager->user_data_dir().Append(tor::kTorProfileDir);

// Delete Tor legacy profile if exists.
if (base::PathExists(tor_legacy_path)) {
profile_manager->MaybeScheduleProfileForDeletion(
tor_legacy_path, base::DoNothing(),
ProfileMetrics::DELETE_PROFILE_SETTINGS);
}
#endif

#if !defined(OS_ANDROID)
Browser* browser = chrome::FindLastActive();
content::WebContents* active_web_contents = nullptr;
Expand All @@ -50,20 +66,3 @@ void BraveBrowserMainParts::PostBrowserStart() {
void BraveBrowserMainParts::PreShutdown() {
content::BraveClearBrowsingData::ClearOnExit();
}

void BraveBrowserMainParts::PostBrowserStart() {
ChromeBrowserMainParts::PostBrowserStart();

#if BUILDFLAG(ENABLE_TOR)
ProfileManager* profile_manager = g_browser_process->profile_manager();
base::FilePath tor_legacy_path =
profile_manager->user_data_dir().Append(tor::kTorProfileDir);

// Delete Tor legacy profile if exists.
if (base::PathExists(tor_legacy_path)) {
profile_manager->MaybeScheduleProfileForDeletion(
tor_legacy_path, base::DoNothing(),
ProfileMetrics::DELETE_PROFILE_SETTINGS);
}
#endif
}
1 change: 0 additions & 1 deletion browser/brave_browser_main_parts.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class BraveBrowserMainParts : public ChromeBrowserMainParts {

void PostBrowserStart() override;
void PreShutdown() override;
void PostBrowserStart() override;

private:
DISALLOW_COPY_AND_ASSIGN(BraveBrowserMainParts);
Expand Down

0 comments on commit 1db5505

Please sign in to comment.