Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update
Browse files Browse the repository at this point in the history
jumde committed Mar 22, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 214951e commit d871145
Showing 2 changed files with 42 additions and 26 deletions.
2 changes: 0 additions & 2 deletions brave/browser/brave_browser_context.h
Original file line number Diff line number Diff line change
@@ -101,11 +101,9 @@ class BraveBrowserContext : public Profile {
return user_prefs_.get(); }

sync_preferences::PrefServiceSyncable* GetPrefs() {
LOG(ERROR) << "Getting Prefs1";
return user_prefs_.get(); }

const sync_preferences::PrefServiceSyncable* GetPrefs() const override {
LOG(ERROR) << "Getting Prefs2";
return static_cast<const Profile*>(this)->GetPrefs();
}

66 changes: 42 additions & 24 deletions patches/master_patch.patch
Original file line number Diff line number Diff line change
@@ -76,19 +76,6 @@ index 4bb4a043cbbcb562aed8926867660547cd7f018c..769bc73607b600d549b6185a37d6b0cc
branding_path_component = "chromium"
}
+}
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 2673c6a798890811aa4062439f3a34b8da606120..693d9ba6a7b57768538a544e08ee5e5099efd6ac 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1861,7 +1861,7 @@ config("default_optimization") {
# The NaCl IRT is a special case and always wants its own config.
# It gets optimized the same way regardless of the type of build.
configs = [ "//build/config/nacl:irt_optimize" ]
- } else if (is_debug) {
+ } else if (is_debug || !is_official_build) {
configs = [ ":no_optimize" ]
} else if (optimize_for_fuzzing) {
assert(!is_win, "Fuzzing optimize level not supported on Windows")
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index f66bca0ea2c85577dd5b28ddfdbe252f1824df2e..2334814336d4f0b7abf78e00e8d2412e18668eba 100644
--- a/build/toolchain/mac/BUILD.gn
@@ -523,6 +510,37 @@ index 440fdf8df66efce1b68a0463189986a6a0b0353a..7cc8fb11ecb5e2caa67e4e92d6d4526e
// Finds TabStripModel which has a WebContents whose id is the given
// |tab_id|, and returns the WebContents index and the TabStripModel.
int FindTabStripModelById(int32_t tab_id, TabStripModel** model) const;
diff --git a/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc b/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
index aab0c41d0933af5a28f333e60165a635f4411be8..2bf4fcb554c9c2ed76fcebc0f1d548557688d20f 100644
--- a/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
@@ -485,10 +485,10 @@ void SafeBrowsingNavigationObserverManager::RecordNewWebContents(

// static
size_t SafeBrowsingNavigationObserverManager::CountOfRecentNavigationsToAppend(
- const Profile& profile,
+ Profile* profile,
AttributionResult result) {
- if (!IsExtendedReportingEnabled(*profile.GetPrefs()) ||
- profile.IsOffTheRecord() || result == SUCCESS_LANDING_REFERRER ||
+ if (!IsExtendedReportingEnabled(*profile->GetPrefs()) ||
+ profile->IsOffTheRecord() || result == SUCCESS_LANDING_REFERRER ||
!base::FeatureList::IsEnabled(kAppendRecentNavigationEvents)) {
return 0u;
}
diff --git a/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h b/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h
index 562c1d040d7bc084e8440a39681778cfcda690ea..81c952d83cad667ee3ad569daf7aef749f0dfe11 100644
--- a/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h
+++ b/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.h
@@ -217,7 +217,7 @@ class SafeBrowsingNavigationObserverManager

// Based on user state, attribution result and finch parameter, calculates the
// number of recent navigations we want to append to the referrer chain.
- static size_t CountOfRecentNavigationsToAppend(const Profile& profile,
+ static size_t CountOfRecentNavigationsToAppend(Profile* profile,
AttributionResult result);

// Appends |recent_navigation_count| number of recent navigation events to
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index d08a945c6b11a918fa5faedcb1c87c269772e877..c45ee400756147e646f76079fafc1718854a4c53 100644
--- a/chrome/common/BUILD.gn
@@ -656,7 +674,7 @@ diff --git a/chrome/common/chrome_paths_mac.mm b/chrome/common/chrome_paths_mac.
index cca3bbb41ae25484c3e87c9aba09a8b07741e2b2..57abbcfd90dab7bbf1b5dffc35b17d3ade1a5e1e 100644
--- a/chrome/common/chrome_paths_mac.mm
+++ b/chrome/common/chrome_paths_mac.mm
@@ -40,7 +40,9 @@
@@ -40,7 +40,9 @@ NSBundle* OuterAppBundleInternal() {

// From C.app/Contents/Versions/1.2.3.4, go up three steps to get to C.app.
base::FilePath versioned_dir = chrome::GetVersionedDirectory();
@@ -1091,7 +1109,7 @@ diff --git a/components/crash/content/app/crashpad_mac.mm b/components/crash/con
index 6508c2a067609897ea14b96b3852fa3bcf31cc65..27c0545722cf50d2a0a46f36d5e2b9f35d52406f 100644
--- a/components/crash/content/app/crashpad_mac.mm
+++ b/components/crash/content/app/crashpad_mac.mm
@@ -54,6 +54,8 @@
@@ -54,6 +54,8 @@ base::FilePath PlatformCrashpadInitialization(
// Only allow the possibility of report upload in official builds. This
// crash server won't have symbols for any other build types.
std::string url = "https://clients2.google.com/cr/report";
@@ -1249,7 +1267,7 @@ index 2b38db266f9aa1f4141c8649c021042ede4e5589..ea0387b11f4b00f87596d738c152aa4c
#include "base/mac/mac_logging.h"
#include "base/rand_util.h"
#include "crypto/apple_keychain.h"
@@ -61,6 +62,14 @@
@@ -61,6 +62,14 @@ const char KeychainPassword::account_name[] = "Chromium";
std::string KeychainPassword::GetPassword() const {
UInt32 password_length = 0;
void* password_data = NULL;
@@ -1513,7 +1531,7 @@ diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_mac.mm
index 83a8792dbe1ee56e7541828861253b2d5d39cc22..52515549ce39704a701847d14143c493ff3c9050 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_mac.mm
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_mac.mm
@@ -22,7 +22,7 @@ @interface SyntheticPinchEvent : NSObject
@@ -22,7 +22,7 @@
// Filled with default values.
@property(readonly) CGFloat deltaX;
@property(readonly) CGFloat deltaY;
@@ -1556,7 +1574,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/cont
index 5d9a7a01faedc2a80aade71e65ca16d102f9efda..6be3c4c1f11e8f32559c408e818513637e9327cc 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -139,6 +139,12 @@ BOOL EventIsReservedBySystem(NSEvent* event) {
@@ -139,6 +139,12 @@ RenderWidgetHostView* GetRenderWidgetHostViewToUse(

} // namespace

@@ -1569,7 +1587,7 @@ index 5d9a7a01faedc2a80aade71e65ca16d102f9efda..6be3c4c1f11e8f32559c408e81851363
// These are not documented, so use only after checking -respondsToSelector:.
@interface NSApplication (UndocumentedSpeechMethods)
- (void)speakString:(NSString*)string;
@@ -1612,6 +1618,10 @@ new BrowserCompositorMac(this, this, render_widget_host_->is_hidden(),
@@ -1612,6 +1618,10 @@ void RenderWidgetHostViewMac::SetActive(bool active) {
if (render_widget_host_) {
render_widget_host_->SetActive(active);
if (active) {
@@ -1580,7 +1598,7 @@ index 5d9a7a01faedc2a80aade71e65ca16d102f9efda..6be3c4c1f11e8f32559c408e81851363
if (HasFocus())
render_widget_host_->Focus();
} else {
@@ -1875,7 +1885,14 @@ - (BOOL)acceptsMouseEventsWhenInactive {
@@ -1875,7 +1885,14 @@ Class GetRenderWidgetHostViewCocoaClassForTesting() {
}

- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@@ -1595,7 +1613,7 @@ index 5d9a7a01faedc2a80aade71e65ca16d102f9efda..6be3c4c1f11e8f32559c408e81851363
}

- (void)setCloseOnDeactivate:(BOOL)b {
@@ -2108,8 +2125,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -2108,8 +2125,10 @@ Class GetRenderWidgetHostViewCocoaClassForTesting() {
if (EventIsReservedBySystem(theEvent))
return;

@@ -1606,7 +1624,7 @@ index 5d9a7a01faedc2a80aade71e65ca16d102f9efda..6be3c4c1f11e8f32559c408e81851363

if ([theEvent type] == NSFlagsChanged) {
// Ignore NSFlagsChanged events from the NumLock and Fn keys as
@@ -2981,6 +3000,11 @@ - (RenderWidgetHostViewMac*)renderWidgetHostViewMac {
@@ -2981,6 +3000,11 @@ Class GetRenderWidgetHostViewCocoaClassForTesting() {
// move) for the given event. Customize here to be more selective about which
// key presses to autohide on.
- (BOOL)shouldAutohideCursorForEvent:(NSEvent*)event {
@@ -1679,7 +1697,7 @@ diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/bro
index 2c5dd9e99e6da2886063b4d4ca86605ca5ff13d3..9bf9e8a762cf3ec28b6d05e6a151a86698d2b7fe 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -614,6 +614,7 @@ - (void)draggedImage:(NSImage*)anImage
@@ -614,6 +614,7 @@ void WebContentsViewMac::CloseTab() {
endedAt:(NSPoint)screenPoint
operation:(NSDragOperation)operation {
[dragSource_ endDragAt:screenPoint operation:operation];
@@ -1705,7 +1723,7 @@ diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser
index 35c4ee35242ac1e21beb94ae6b844dff14e04580..fdfc3b0ac56774fc5fd6a591ccad052c8cbec0cb 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -347,6 +347,12 @@ - (void)setDragStartTrackersForProcess:(int)processID {
@@ -347,6 +347,12 @@ GetRenderWidgetHostAtPoint:(const NSPoint&)viewPoint
dragStartViewID_ = GetRenderViewHostID(webContents_->GetRenderViewHost());
}

0 comments on commit d871145

Please sign in to comment.