This repository has been archived by the owner on Jan 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy pathmaster_patch.patch
1934 lines (1814 loc) · 87.3 KB
/
master_patch.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
index c669e181cef943ee6c3095cbd2af07f9204a2894..b284702fbf68c83caac36263b913a00e5137f0c6 100644
--- a/base/threading/thread_restrictions.h
+++ b/base/threading/thread_restrictions.h
@@ -31,6 +31,13 @@ class StatisticsProviderImpl;
namespace chrome_browser_net {
class Predictor;
}
+
+namespace atom {
+namespace api {
+ class Session;
+}
+}
+
namespace content {
class BrowserGpuChannelHostFactory;
class BrowserGpuMemoryBufferManager;
@@ -221,6 +228,9 @@ class BASE_EXPORT ThreadRestrictions {
friend class ui::CommandBufferLocal;
friend class ui::GpuState;
+ // BB: MUON ones that maybe need to be fixed???
+ friend class atom::api::Session;
+
// END ALLOWED USAGE.
// BEGIN USAGE THAT NEEDS TO BE FIXED.
friend class ::chromeos::BlockingMethodCaller; // http://crbug.com/125360
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index de3f35f124aadd66ea21c3870651f7962f98f2cb..e2e7aeaf931102e61515d506fc0f063d70953d8d 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -151,6 +151,8 @@ declare_args() {
host_toolchain = ""
# DON'T ADD MORE FLAGS HERE. Read the comment above.
+ # Build chromium without muon flags
+ muon_chromium_build = false
}
declare_args() {
@@ -521,6 +523,13 @@ default_compiler_configs = [
"//build/config/compiler:runtime_library",
"//build/config/sanitizers:default_sanitizer_flags",
]
+if (!muon_chromium_build) {
+ default_compiler_configs -= [ "//build/config/compiler:default_include_dirs" ]
+ default_compiler_configs += [
+ "//electron/build:muon_include_dirs",
+ "//build/config/compiler:default_include_dirs"
+ ]
+}
if (is_win) {
default_compiler_configs += [
"//build/config/win:default_crt",
diff --git a/build/config/chrome_build.gni b/build/config/chrome_build.gni
index c649018a7a0aeb20caeb2bf37c60d57c48630f1b..bd0345335b129a059d507e69a9d4e8de3c7eebee 100644
--- a/build/config/chrome_build.gni
+++ b/build/config/chrome_build.gni
@@ -11,12 +11,15 @@ declare_args() {
# Break chrome.dll into multple pieces based on process type. Only available
# on Windows.
is_multi_dll_chrome = is_win && !is_component_build
+ branding_path_component = ""
}
# Refers to the subdirectory for branding in various places including
# chrome/app/theme.
+if (branding_path_component == "") {
if (is_chrome_branded) {
branding_path_component = "google_chrome"
} else {
branding_path_component = "chromium"
}
+}
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 71a3f8ef95dd20c00aecb8d7e2b81d8e08ed44ca..575854aed67da0cc7fe7dc235975ab1be1e03e38 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -245,13 +245,15 @@ template("mac_toolchain") {
}
tool("alink") {
+ rspfile = "{{output}}.rsp"
script =
rebase_path("//build/toolchain/mac/filter_libtool.py", root_build_dir)
- command = "$env_wrapper rm -f {{output}} && TOOL_VERSION=${tool_versions.filter_libtool} python $script libtool -static {{arflags}} -o {{output}} {{inputs}}"
+ command = "$env_wrapper rm -f {{output}} && TOOL_VERSION=${tool_versions.filter_libtool} python $script libtool -static {{arflags}} -o {{output}} -filelist \"$rspfile\""
description = "LIBTOOL-STATIC {{output}}"
outputs = [
"{{output_dir}}/{{target_output_name}}{{output_extension}}",
]
+ rspfile_content = "{{inputs_newline}}"
default_output_dir = "{{target_out_dir}}"
default_output_extension = ".a"
output_prefix = "lib"
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
index a113979bcc955d28967b078f038d8e39c450bc53..fae9f92f775a18d0efbe235ee6733aea6fe815e0 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/win/visual_studio_version.gni")
+import("//build/toolchain/cc_wrapper.gni")
import("//build/toolchain/clang_static_analyzer.gni")
import("//build/toolchain/goma.gni")
import("//build/toolchain/toolchain.gni")
@@ -28,6 +29,8 @@ if (use_goma) {
} else {
goma_prefix = "$goma_dir/gomacc "
}
+} else if (cc_wrapper != "") {
+ goma_prefix = "$cc_wrapper "
} else {
goma_prefix = ""
}
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index ffbe312d99645bb93b9e8d66653cea2b44dbe597..af32f98aa3e1272a52ac5a66b50217fe2f9027b4 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -34,6 +34,11 @@ if (is_android) {
import("//build/util/version.gni")
import("//media/cdm/ppapi/cdm_paths.gni")
import("//third_party/icu/config.gni")
+ if (!muon_chromium_build) {
+ # Avoid mac app/framework naming conflicts
+ chrome_product_full_name = "Google Chrome"
+ chrome_product_short_name = "Google Chrome"
+ }
}
assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome")
diff --git a/chrome/app/chrome_crash_reporter_client_win.cc b/chrome/app/chrome_crash_reporter_client_win.cc
index b2329c1c2ffa811b240d7e6528b1561ef77b36e5..4c1a73c3058803b8660cf414b6fbf01876994172 100644
--- a/chrome/app/chrome_crash_reporter_client_win.cc
+++ b/chrome/app/chrome_crash_reporter_client_win.cc
@@ -94,6 +94,10 @@ size_t RegisterCrashKeysHelper() {
// For now these need to be kept relatively up to date with those in
// chrome/common/crash_keys.cc::RegisterChromeCrashKeys().
static constexpr base::debug::CrashKey kFixedKeys[] = {
+ {"javascript-info", kHugeSize},
+ {"_version", kSmallSize},
+ {"muon-version", kSmallSize},
+ {"node-env", kSmallSize},
{kMetricsClientId, kSmallSize},
{kChannel, kSmallSize},
{kActiveURL, kLargeSize},
diff --git a/chrome/browser/chrome_content_browser_manifest_overlay.json b/chrome/browser/chrome_content_browser_manifest_overlay.json
index e659aec2f7d606037a7867d6ae1f7186d96ce8eb..a446553206403b575e3e0b3b49027b41f7c43eb1 100644
--- a/chrome/browser/chrome_content_browser_manifest_overlay.json
+++ b/chrome/browser/chrome_content_browser_manifest_overlay.json
@@ -13,7 +13,7 @@
"extensions::StashService",
"metrics::mojom::LeakDetector",
"mojom::ModuleEventSink",
- "rappor::mojom::RapporRecorder",
+// "rappor::mojom::RapporRecorder",
"safe_browsing::mojom::SafeBrowsing",
"spellcheck::mojom::SpellCheckHost",
"spellcheck::mojom::SpellCheckPanelHost",
diff --git a/chrome/browser/importer/external_process_importer_client.h b/chrome/browser/importer/external_process_importer_client.h
index 864a6951115dda5ed74963f18b35692960397d50..3e1a2b719521ac2c60bae05f94e409bc4c7da022 100644
--- a/chrome/browser/importer/external_process_importer_client.h
+++ b/chrome/browser/importer/external_process_importer_client.h
@@ -88,6 +88,8 @@ class ExternalProcessImporterClient
void OnAutofillFormDataImportGroup(
const std::vector<ImporterAutofillFormDataEntry>&
autofill_form_data_entry_group) override;
+ void OnCookiesImportStart(uint32_t total_cookies_count) override {};
+ void OnCookiesImportGroup(const std::vector<ImportedCookieEntry>& cookies_group) override {};
void OnIE7PasswordReceived(
const importer::ImporterIE7PasswordInfo& importer_password_info) override;
diff --git a/chrome/browser/importer/external_process_importer_host.h b/chrome/browser/importer/external_process_importer_host.h
index 08c6f28746cc5f345114a942834db18f5c7a1d41..3a43ae76f054ba449e3b892ea752c62fdad2e5a3 100644
--- a/chrome/browser/importer/external_process_importer_host.h
+++ b/chrome/browser/importer/external_process_importer_host.h
@@ -74,7 +74,10 @@ class ExternalProcessImporterHost
private:
// ExternalProcessImporterHost deletes itself in OnImportEnded().
+ protected:
~ExternalProcessImporterHost() override;
+ private:
+ friend class BraveExternalProcessImporterHost;
// Launches the utility process that starts the import task, unless bookmark
// or template model are not yet loaded. If load is not detected, this method
diff --git a/chrome/browser/importer/in_process_importer_bridge.h b/chrome/browser/importer/in_process_importer_bridge.h
index 247d24220beb7d176b890d7c2d45bdd2dfd8db99..c270bba0fabb557e8d3d1df8ac166bbb00ed6e8b 100644
--- a/chrome/browser/importer/in_process_importer_bridge.h
+++ b/chrome/browser/importer/in_process_importer_bridge.h
@@ -68,7 +68,9 @@ class InProcessImporterBridge : public ImporterBridge {
// End ImporterBridge implementation.
private:
+ protected:
~InProcessImporterBridge() override;
+ private:
ProfileWriter* const writer_; // weak
const base::WeakPtr<ExternalProcessImporterHost> host_;
diff --git a/chrome/browser/metrics/metrics_reporting_state.cc b/chrome/browser/metrics/metrics_reporting_state.cc
index 183a1e7a246c01a1500a9a05e055f892deaffe56..5172ed442244f26a674c650705d96282ae6ec836 100644
--- a/chrome/browser/metrics/metrics_reporting_state.cc
+++ b/chrome/browser/metrics/metrics_reporting_state.cc
@@ -60,6 +60,7 @@ void SetMetricsReporting(bool to_update_pref,
g_browser_process->local_state()->SetBoolean(
metrics::prefs::kMetricsReportingEnabled, updated_pref);
+#if defined(MUON_CHROMIUM_BUILD)
UpdateMetricsPrefsOnPermissionChange(updated_pref);
// Uses the current state of whether reporting is enabled to enable services.
@@ -71,6 +72,7 @@ void SetMetricsReporting(bool to_update_pref,
} else {
RecordMetricsReportingHistogramValue(METRICS_REPORTING_ERROR);
}
+#endif
if (!callback_fn.is_null())
callback_fn.Run(updated_pref);
}
diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc
index e72f2239505de58aa3fb39a195ac1cfd1d5e740f..77d319df83953a785ec446021a5edeba1d95edeb 100644
--- a/chrome/browser/password_manager/password_store_factory.cc
+++ b/chrome/browser/password_manager/password_store_factory.cc
@@ -113,8 +113,10 @@ PasswordStoreFactory::PasswordStoreFactory()
#if defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED)
// TODO(crbug.com/715987). Remove when PasswordReuseDetector is decoupled
// from PasswordStore.
+#if defined(MUON_CHROMIUM_BUILD)
DependsOn(SigninManagerFactory::GetInstance());
#endif
+#endif
}
PasswordStoreFactory::~PasswordStoreFactory() {}
@@ -264,6 +266,7 @@ PasswordStoreFactory::BuildServiceInstanceFor(
ps.get(), profile->GetPrefs(),
make_scoped_refptr(profile->GetRequestContext()));
+#if defined(MUON_CHROMIUM_BUILD)
#if defined(OS_WIN) || defined(OS_MACOSX) || \
(defined(OS_LINUX) && !defined(OS_CHROMEOS))
std::unique_ptr<password_manager::PasswordStoreSigninNotifier> notifier =
@@ -271,6 +274,7 @@ PasswordStoreFactory::BuildServiceInstanceFor(
profile);
ps->SetPasswordStoreSigninNotifier(std::move(notifier));
#endif
+#endif
return ps;
}
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index 88cecc9cbd2ed9497aceaae6907a60e50f7fd20c..2c8bba13d8ad970ff8da4509ab5d1ef4e448e5b8 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -59,13 +59,13 @@ namespace {
void ShowWarningMessageBox(const base::string16& message) {
// Runs always on the UI thread.
- static bool is_dialog_shown = false;
- if (is_dialog_shown)
- return;
+ // static bool is_dialog_shown = false;
+ // if (is_dialog_shown)
+ // return;
// Block opening dialog from nested task.
- base::AutoReset<bool> auto_reset(&is_dialog_shown, true);
+ // base::AutoReset<bool> auto_reset(&is_dialog_shown, true);
- chrome::ShowWarningMessageBox(nullptr, base::string16(), message);
+ // chrome::ShowWarningMessageBox(nullptr, base::string16(), message);
}
} // namespace
diff --git a/chrome/browser/renderer_host/chrome_extension_message_filter.cc b/chrome/browser/renderer_host/chrome_extension_message_filter.cc
index 5b98dda96e08f425ac1d63b119874f30be0d0ed9..1ae5ce0126b509b3d56aa84f23c75b69b2609864 100644
--- a/chrome/browser/renderer_host/chrome_extension_message_filter.cc
+++ b/chrome/browser/renderer_host/chrome_extension_message_filter.cc
@@ -16,16 +16,19 @@
#include "base/task_scheduler/post_task.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
+#if 0
#include "chrome/browser/extensions/activity_log/activity_action_constants.h"
#include "chrome/browser/extensions/activity_log/activity_actions.h"
#include "chrome/browser/extensions/activity_log/activity_log.h"
#include "chrome/browser/extensions/api/activity_log_private/activity_log_private_api.h"
+#endif // 0
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/extensions/chrome_extension_messages.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
#include "extensions/browser/extension_system.h"
+#include "extensions/browser/info_map.h"
#include "extensions/common/extension_messages.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/file_util.h"
@@ -41,6 +44,7 @@ const uint32_t kFilteredMessageClasses[] = {
ChromeExtensionMsgStart, ExtensionMsgStart,
};
+#if 0
// Logs an action to the extension activity log for the specified profile.
void AddActionToExtensionActivityLog(Profile* profile,
extensions::ActivityLog* activity_log,
@@ -53,6 +57,7 @@ void AddActionToExtensionActivityLog(Profile* profile,
action->set_page_incognito(profile->IsOffTheRecord());
activity_log->LogAction(action);
}
+#endif // 0
} // namespace
@@ -63,7 +68,7 @@ ChromeExtensionMessageFilter::ChromeExtensionMessageFilter(
arraysize(kFilteredMessageClasses)),
render_process_id_(render_process_id),
profile_(profile),
- activity_log_(extensions::ActivityLog::GetInstance(profile)),
+ // activity_log_(extensions::ActivityLog::GetInstance(profile)),
extension_info_map_(
extensions::ExtensionSystem::Get(profile)->info_map()) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -82,12 +87,14 @@ bool ChromeExtensionMessageFilter::OnMessageReceived(
IPC_BEGIN_MESSAGE_MAP(ChromeExtensionMessageFilter, message)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ExtensionHostMsg_GetMessageBundle,
OnGetExtMessageBundle)
+#if 0
IPC_MESSAGE_HANDLER(ExtensionHostMsg_AddAPIActionToActivityLog,
OnAddAPIActionToExtensionActivityLog);
IPC_MESSAGE_HANDLER(ExtensionHostMsg_AddDOMActionToActivityLog,
OnAddDOMActionToExtensionActivityLog);
IPC_MESSAGE_HANDLER(ExtensionHostMsg_AddEventToActivityLog,
OnAddEventToExtensionActivityLog);
+#endif // 0
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -97,9 +104,11 @@ bool ChromeExtensionMessageFilter::OnMessageReceived(
void ChromeExtensionMessageFilter::OverrideThreadForMessage(
const IPC::Message& message, BrowserThread::ID* thread) {
switch (message.type()) {
+#if 0
case ExtensionHostMsg_AddAPIActionToActivityLog::ID:
case ExtensionHostMsg_AddDOMActionToActivityLog::ID:
case ExtensionHostMsg_AddEventToActivityLog::ID:
+#endif // 0
*thread = BrowserThread::UI;
break;
default:
@@ -181,6 +190,7 @@ void ChromeExtensionMessageFilter::OnGetExtMessageBundleAsync(
Send(reply_msg);
}
+#if 0
void ChromeExtensionMessageFilter::OnAddAPIActionToExtensionActivityLog(
const std::string& extension_id,
const ExtensionHostMsg_APIActionOrEvent_Params& params) {
@@ -231,6 +241,7 @@ void ChromeExtensionMessageFilter::OnAddEventToExtensionActivityLog(
}
AddActionToExtensionActivityLog(profile_, activity_log_, action);
}
+#endif // 0
void ChromeExtensionMessageFilter::Observe(
int type,
@@ -238,7 +249,7 @@ void ChromeExtensionMessageFilter::Observe(
const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type);
profile_ = NULL;
- activity_log_ = nullptr;
+ // activity_log_ = nullptr;
}
bool ChromeExtensionMessageFilter::ShouldLogExtensionAction(
@@ -247,7 +258,8 @@ bool ChromeExtensionMessageFilter::ShouldLogExtensionAction(
// conditions (e.g. logging gets disabled but the renderer sends the message
// before it gets updated), we still need this check here.
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- return profile_ &&
- g_browser_process->profile_manager()->IsValidProfile(profile_) &&
- activity_log_ && activity_log_->ShouldLog(extension_id);
+ // return profile_ &&
+ // g_browser_process->profile_manager()->IsValidProfile(profile_) &&
+ // activity_log_ && activity_log_->ShouldLog(extension_id);
+ return false;
}
diff --git a/chrome/browser/renderer_host/chrome_extension_message_filter.h b/chrome/browser/renderer_host/chrome_extension_message_filter.h
index 663cda3f3413e5495f8ec77eaaf33c835cc00711..8c9b1fd5abe7fd3e17a3e98c479f056ccbe14a5b 100644
--- a/chrome/browser/renderer_host/chrome_extension_message_filter.h
+++ b/chrome/browser/renderer_host/chrome_extension_message_filter.h
@@ -54,6 +54,7 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter,
const std::string& main_extension_id,
const std::string& default_locale,
IPC::Message* reply_msg);
+#if 0
void OnAddAPIActionToExtensionActivityLog(
const std::string& extension_id,
const ExtensionHostMsg_APIActionOrEvent_Params& params);
@@ -66,6 +67,7 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter,
void OnAddEventToExtensionActivityLog(
const std::string& extension_id,
const ExtensionHostMsg_APIActionOrEvent_Params& params);
+#endif // 0
// content::NotificationObserver implementation.
void Observe(int type,
diff --git a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc
index 0da4a534c0adae8b0edd2ffeace9972ce3e63c6c..0d1f9efcb260f8c943ab24a4c23c14dbc23863b8 100644
--- a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc
+++ b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc
@@ -58,13 +58,13 @@ ChromeBrowserPepperHostFactory::CreateResourceHost(
return std::unique_ptr<ResourceHost>(new MessageFilterHost(
host_->GetPpapiHost(), instance, resource, pv_filter));
}
- case PpapiHostMsg_OutputProtection_Create::ID: {
- scoped_refptr<ResourceMessageFilter> output_protection_filter(
- new chrome::PepperOutputProtectionMessageFilter(host_, instance));
- return std::unique_ptr<ResourceHost>(
- new MessageFilterHost(host_->GetPpapiHost(), instance, resource,
- output_protection_filter));
- }
+ // case PpapiHostMsg_OutputProtection_Create::ID: {
+ // scoped_refptr<ResourceMessageFilter> output_protection_filter(
+ // new chrome::PepperOutputProtectionMessageFilter(host_, instance));
+ // return std::unique_ptr<ResourceHost>(
+ // new MessageFilterHost(host_->GetPpapiHost(), instance, resource,
+ // output_protection_filter));
+ // }
}
}
diff --git a/chrome/browser/resource_coordinator/tab_manager.cc b/chrome/browser/resource_coordinator/tab_manager.cc
index 8b15dc39152e45dff418bf635c04f7c7b543855f..19109c4610e9804eaa087ac2f3b85a20d1f791a8 100644
--- a/chrome/browser/resource_coordinator/tab_manager.cc
+++ b/chrome/browser/resource_coordinator/tab_manager.cc
@@ -730,7 +730,8 @@ void TabManager::AddTabStats(const BrowserInfo& browser_info,
TabStripModel* tab_strip_model = browser_info.tab_strip_model;
for (int i = 0; i < tab_strip_model->count(); i++) {
WebContents* contents = tab_strip_model->GetWebContentsAt(i);
- if (!contents->IsCrashed()) {
+ // TODO(bridiver) - temporary workaround for pinned and unloaded tabs
+ if (contents && !contents->IsCrashed()) {
TabStats stats;
stats.is_app = browser_info.browser_is_app;
stats.is_internal_page = IsInternalPage(contents->GetLastCommittedURL());
@@ -827,6 +828,17 @@ void TabManager::PurgeBackgroundedTabsIfNeeded() {
}
}
+// MUON(bridiver): see tab_manager.h
+WebContents* TabManager::CreateNullContents(
+ TabStripModel* model, WebContents* old_contents) {
+ return WebContents::Create(WebContents::CreateParams(model->profile()));
+}
+
+// MUON(bridiver): see tab_manager.h
+void TabManager::DestroyOldContents(WebContents* old_contents) {
+ delete old_contents;
+}
+
WebContents* TabManager::DiscardWebContentsAt(int index,
TabStripModel* model,
DiscardTabCondition condition) {
@@ -844,8 +856,7 @@ WebContents* TabManager::DiscardWebContentsAt(int index,
"TabManager.Discarding.DiscardedTabHasBeforeUnloadHandler",
old_contents->NeedToFireBeforeUnload());
- WebContents* null_contents =
- WebContents::Create(WebContents::CreateParams(model->profile()));
+ WebContents* null_contents = CreateNullContents(model, old_contents);
// Copy over the state from the navigation controller to preserve the
// back/forward history and to continue to display the correct title/favicon.
//
@@ -904,7 +915,8 @@ WebContents* TabManager::DiscardWebContentsAt(int index,
// TODO(jamescook): This breaks script connections with other tabs.
// Find a different approach that doesn't do that, perhaps based on
// RenderFrameProxyHosts.
- delete old_contents;
+ // MUON(bridiver): see tab_manager.h
+ DestroyOldContents(old_contents);
recent_tab_discard_ = true;
return null_contents;
diff --git a/chrome/browser/resource_coordinator/tab_manager.h b/chrome/browser/resource_coordinator/tab_manager.h
index 7acc7baa7cd01b9627e8d231a3a7848cf4ec2295..e857daff2ba3910223f1039f66364faa99392a99 100644
--- a/chrome/browser/resource_coordinator/tab_manager.h
+++ b/chrome/browser/resource_coordinator/tab_manager.h
@@ -92,6 +92,11 @@ class TabManager : public TabStripModelObserver,
TabManager();
~TabManager() override;
+ // MUON(bridiver): override to create/destroy guests webcontents
+ virtual content::WebContents* CreateNullContents(
+ TabStripModel* model, content::WebContents* old_contents);
+ virtual void DestroyOldContents(content::WebContents* old_contents);
+
// Number of discard events since Chrome started.
int discard_count() const { return discard_count_; }
@@ -292,6 +297,8 @@ class TabManager : public TabStripModelObserver,
// min time to purge times this value.
const int kDefaultMinMaxTimeToPurgeRatio = 2;
+ friend class GuestTabManager;
+
// Finds TabStripModel which has a WebContents whose id is the given
// web_contents_id, and returns the WebContents index and the TabStripModel.
int FindTabStripModelById(int64_t target_web_contents_id,
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index 653e7692e33d0ee06428366141e5c23043f66b0d..72e13e247e6ddaae02cd08cefafb43051f886055 100644
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -504,6 +504,12 @@ static_library("common") {
]
public_deps += [ "//chrome/common:version_header" ]
}
+
+ if (!muon_chromium_build && enable_extensions) {
+ sources -= [
+ "extensions/chrome_extensions_client.cc",
+ ]
+ }
}
process_version("version_header") {
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc
index 99a3f816756039a628dc3032cbda3971dd415138..7b20fc8dd62b59c6a0d2dc3adb15336546a9e55a 100644
--- a/chrome/common/chrome_constants.cc
+++ b/chrome/common/chrome_constants.cc
@@ -10,11 +10,11 @@
#define FPL FILE_PATH_LITERAL
#if defined(OS_MACOSX)
-#define CHROMIUM_PRODUCT_STRING "Chromium"
+#define CHROMIUM_PRODUCT_STRING PRODUCT_SHORTNAME_STRING
#if defined(GOOGLE_CHROME_BUILD)
-#define PRODUCT_STRING "Google Chrome"
+#define PRODUCT_STRING PRODUCT_SHORTNAME_STRING
#elif defined(CHROMIUM_BUILD)
-#define PRODUCT_STRING "Chromium"
+#define PRODUCT_STRING PRODUCT_SHORTNAME_STRING
#else
#error Unknown branding
#endif
@@ -43,13 +43,13 @@ const char kChromeVersion[] = CHROME_VERSION_STRING;
#if defined(OS_WIN)
const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kBrowserProcessExecutableName[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kHelperProcessExecutableNameChromium[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kHelperProcessExecutableName[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
#elif defined(OS_MACOSX)
const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
FPL(CHROMIUM_PRODUCT_STRING);
@@ -61,7 +61,7 @@ const base::FilePath::CharType kHelperProcessExecutableName[] =
FPL(PRODUCT_STRING " Helper");
#elif defined(OS_ANDROID)
// NOTE: Keep it synced with the process names defined in AndroidManifest.xml.
-const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome");
+const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL(EXECUTABLE_NAME);
const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
FPL("");
const base::FilePath::CharType kHelperProcessExecutableName[] =
@@ -69,8 +69,8 @@ const base::FilePath::CharType kHelperProcessExecutableName[] =
const base::FilePath::CharType kHelperProcessExecutableNameChromium[] = FPL("");
#elif defined(OS_POSIX)
const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
- FPL("chrome");
-const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome");
+ FPL(EXECUTABLE_NAME);
+const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL(EXECUTABLE_NAME);
// Helper processes end up with a name of "exe" due to execing via
// /proc/self/exe. See bug 22703.
const base::FilePath::CharType kHelperProcessExecutableNameChromium[] =
@@ -80,13 +80,13 @@ const base::FilePath::CharType kHelperProcessExecutableName[] = FPL("exe");
#if defined(OS_WIN)
const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kBrowserProcessExecutablePath[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kHelperProcessExecutablePath[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
#elif defined(OS_MACOSX)
const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
FPL(CHROMIUM_PRODUCT_STRING ".app/Contents/MacOS/" CHROMIUM_PRODUCT_STRING);
@@ -98,19 +98,19 @@ const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
const base::FilePath::CharType kHelperProcessExecutablePath[] =
FPL(PRODUCT_STRING " Helper.app/Contents/MacOS/" PRODUCT_STRING " Helper");
#elif defined(OS_ANDROID)
-const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome");
-const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome");
+const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL(EXECUTABLE_NAME);
+const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL(EXECUTABLE_NAME);
const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
- FPL("chrome");
+ FPL(EXECUTABLE_NAME);
const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
- FPL("chrome");
+ FPL(EXECUTABLE_NAME);
#elif defined(OS_POSIX)
const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
- FPL("chrome");
-const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome");
+ FPL(EXECUTABLE_NAME);
+const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL(EXECUTABLE_NAME);
const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
- FPL("chrome");
-const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome");
+ FPL(EXECUTABLE_NAME);
+const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL(EXECUTABLE_NAME);
#endif // OS_*
#if defined(OS_MACOSX)
@@ -121,7 +121,7 @@ const base::FilePath::CharType kFrameworkExecutableName[] =
#endif // OS_MACOSX
#if defined(OS_WIN)
-const base::FilePath::CharType kBrowserResourcesDll[] = FPL("chrome.dll");
+const base::FilePath::CharType kBrowserResourcesDll[] = FPL("brave.dll");
const base::FilePath::CharType kChromeElfDllName[] = FPL("chrome_elf.dll");
const base::FilePath::CharType kStatusTrayWindowClass[] =
FPL("Chrome_StatusTrayWindow");
diff --git a/chrome/common/chrome_paths_mac.mm b/chrome/common/chrome_paths_mac.mm
index cca3bbb41ae25484c3e87c9aba09a8b07741e2b2..57abbcfd90dab7bbf1b5dffc35b17d3ade1a5e1e 100644
--- a/chrome/common/chrome_paths_mac.mm
+++ b/chrome/common/chrome_paths_mac.mm
@@ -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();
- base::FilePath outer_app_dir = versioned_dir.DirName().DirName().DirName();
+ // electron uses Frameworks in place of Versions/1.2.3.4
+ // TODO(bridiver) - change this to match chrome
+ base::FilePath outer_app_dir = versioned_dir.DirName().DirName();
const char* outer_app_dir_c = outer_app_dir.value().c_str();
NSString* outer_app_dir_ns = [NSString stringWithUTF8String:outer_app_dir_c];
diff --git a/chrome/common/chrome_version.h.in b/chrome/common/chrome_version.h.in
index f0a0bcd0098ec31b18bb00588ad8fd11b439fd6f..888572f87a71e6e8444bd6a302343e453aef4287 100644
--- a/chrome/common/chrome_version.h.in
+++ b/chrome/common/chrome_version.h.in
@@ -22,3 +22,5 @@
// Changelist Information
#define LASTCHANGE_STRING "@LASTCHANGE@"
+
+#define EXECUTABLE_NAME "@EXECUTABLE_NAME@"
diff --git a/chrome/common/crash_keys.cc b/chrome/common/crash_keys.cc
index effec5c3de01b203b07e71477b5fd24eb62c4a5e..c6e5787e7998a101602e934c511ec070fed528aa 100644
--- a/chrome/common/crash_keys.cc
+++ b/chrome/common/crash_keys.cc
@@ -99,6 +99,12 @@ size_t RegisterChromeCrashKeys() {
// RegisterWebViewCrashKeys(),
// chromecast/crash/cast_crash_keys.cc::RegisterCastCrashKeys().
base::debug::CrashKey fixed_keys[] = {
+#if !defined(MUON_CHROMIUM_BUILD)
+ {"javascript-info", kHugeSize},
+ {"_version", kSmallSize},
+ {"muon-version", kSmallSize},
+ {"node-env", kSmallSize},
+#endif
#if defined(OS_MACOSX) || defined(OS_WIN)
{kMetricsClientId, kSmallSize},
#else
diff --git a/chrome/common/importer/edge_importer_utils_win.cc b/chrome/common/importer/edge_importer_utils_win.cc
index c2abd64b2d7c5166c1fdbaaf782974cb4bcc5e53..eb59bbe098dabd0edd3d9d8e24befe1006e56b8b 100644
--- a/chrome/common/importer/edge_importer_utils_win.cc
+++ b/chrome/common/importer/edge_importer_utils_win.cc
@@ -73,7 +73,9 @@ bool IsEdgeFavoritesLegacyMode() {
// for its favorites.
if (key.ReadValueDW(L"FavoritesESEEnabled", &ese_enabled) == ERROR_SUCCESS)
return !ese_enabled;
- return true;
+ // return true;
+ // No value to read means not legacy mode
+ return false;
}
bool EdgeImporterCanImport() {
diff --git a/chrome/common/importer/importer_data_types.h b/chrome/common/importer/importer_data_types.h
index 0fc90c62398a93eb89568ce78c8ded2bc9b232b6..50a7d3c0079b7e9c5bc38a4ae3b25eef6d024169 100644
--- a/chrome/common/importer/importer_data_types.h
+++ b/chrome/common/importer/importer_data_types.h
@@ -83,6 +83,7 @@ enum VisitSource {
VISIT_SOURCE_FIREFOX_IMPORTED = 1,
VISIT_SOURCE_IE_IMPORTED = 2,
VISIT_SOURCE_SAFARI_IMPORTED = 3,
+ VISIT_SOURCE_CHROME_IMPORTED = 4,
};
} // namespace importer
diff --git a/chrome/common/importer/importer_type.h b/chrome/common/importer/importer_type.h
index c172f8a5bc534465ff4d063a52f9bb510b7e36af..437026ae26eec5dce80edb73929a0fbce870cc37 100644
--- a/chrome/common/importer/importer_type.h
+++ b/chrome/common/importer/importer_type.h
@@ -19,6 +19,8 @@ enum ImporterType {
TYPE_IE = 0,
#endif
// Value 1 was the (now deleted) Firefox 2 profile importer.
+ // We use it for chrome profile now.
+ TYPE_CHROME = 1,
TYPE_FIREFOX = 2,
#if defined(OS_MACOSX)
TYPE_SAFARI = 3,
diff --git a/chrome/common/importer/profile_import.mojom b/chrome/common/importer/profile_import.mojom
index d5fa210c58244a5c9bc2aed4fa80d903920f604e..3f24c00ba2024fb1a6553d4fc69dae5f71c4d08c 100644
--- a/chrome/common/importer/profile_import.mojom
+++ b/chrome/common/importer/profile_import.mojom
@@ -18,6 +18,9 @@ struct ImportedBookmarkEntry;
struct ImporterAutofillFormDataEntry;
[Native]
+struct ImportedCookieEntry;
+
+[Native]
struct SearchEngineInfo;
[Native]
@@ -65,6 +68,8 @@ interface ProfileImportObserver {
OnAutofillFormDataImportStart(uint32 total_autofill_form_data_entry_count);
OnAutofillFormDataImportGroup(
array<ImporterAutofillFormDataEntry> autofill_form_data_entry_group);
+ OnCookiesImportStart(uint32 total_cookies_count);
+ OnCookiesImportGroup(array<ImportedCookieEntry> cookies_group);
// Windows only:
OnIE7PasswordReceived(ImporterIE7PasswordInfo importer_password_info);
};
diff --git a/chrome/common/importer/profile_import.typemap b/chrome/common/importer/profile_import.typemap
index 6283f2bf6871a10f710694772b5da0bc9b70c2ad..d5d1de309cb50eb9f8757d32d0eec3b42d08f9c0 100644
--- a/chrome/common/importer/profile_import.typemap
+++ b/chrome/common/importer/profile_import.typemap
@@ -9,6 +9,7 @@ public_headers = [
"//chrome/common/importer/importer_data_types.h",
"//chrome/common/importer/importer_url_row.h",
"//components/favicon_base/favicon_usage_data.h",
+ "//electron/brave/common/importer/imported_cookie_entry.h",
]
traits_headers =
[ "//chrome/common/importer/profile_import_process_param_traits.h" ]
@@ -26,4 +27,5 @@ type_mappings = [
"chrome.mojom.SearchEngineInfo=::importer::SearchEngineInfo",
"chrome.mojom.SourceProfile=::importer::SourceProfile",
"chrome.mojom.ImportItem=::importer::ImportItem",
+ "chrome.mojom.ImportedCookieEntry=::ImportedCookieEntry",
]
diff --git a/chrome/common/importer/profile_import_process_param_traits_macros.h b/chrome/common/importer/profile_import_process_param_traits_macros.h
index eb4b00d6ed6af19c4fc998e81dab735db63484e9..04579f1c6a7f0d102a36a58ca4d9b497dbf28754 100644
--- a/chrome/common/importer/profile_import_process_param_traits_macros.h
+++ b/chrome/common/importer/profile_import_process_param_traits_macros.h
@@ -24,6 +24,7 @@
#include "components/favicon_base/favicon_usage_data.h"
#include "content/public/common/common_param_traits.h"
#include "ipc/ipc_message_macros.h"
+#include "electron/brave/common/importer/imported_cookie_entry.h"
#if defined(OS_WIN)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImporterType,
@@ -92,4 +93,14 @@ IPC_STRUCT_TRAITS_BEGIN(importer::ImporterIE7PasswordInfo)
IPC_STRUCT_TRAITS_MEMBER(date_created)
IPC_STRUCT_TRAITS_END()
+IPC_STRUCT_TRAITS_BEGIN(ImportedCookieEntry)
+ IPC_STRUCT_TRAITS_MEMBER(domain)
+ IPC_STRUCT_TRAITS_MEMBER(name)
+ IPC_STRUCT_TRAITS_MEMBER(value)
+ IPC_STRUCT_TRAITS_MEMBER(host)
+ IPC_STRUCT_TRAITS_MEMBER(path)
+ IPC_STRUCT_TRAITS_MEMBER(expiry_date)
+ IPC_STRUCT_TRAITS_MEMBER(secure)
+ IPC_STRUCT_TRAITS_MEMBER(httponly)
+IPC_STRUCT_TRAITS_END()
#endif // CHROME_COMMON_IMPORTER_PROFILE_IMPORT_PROCESS_PARAM_TRAITS_MACROS_H_
diff --git a/chrome/common/mac/app_mode_chrome_locator.mm b/chrome/common/mac/app_mode_chrome_locator.mm
index efd272e706ba56b748e4b76b96d76cbd03aa07ac..051851c40e6b721035c6b57ed5b359624d55e525 100644
--- a/chrome/common/mac/app_mode_chrome_locator.mm
+++ b/chrome/common/mac/app_mode_chrome_locator.mm
@@ -80,6 +80,7 @@ bool GetChromeBundleInfo(const base::FilePath& chrome_bundle,
// on the data in their plist, so encode the framework names here.
NSDictionary* framework_for_exe = @{
@"Chromium": @"Chromium",
+ @"Brave": @"Brave",
@"Google Chrome": @"Google Chrome",
@"Google Chrome Canary": @"Google Chrome",
};
diff --git a/chrome/common/media/cdm_host_file_path.cc b/chrome/common/media/cdm_host_file_path.cc
index 317ea8faa3989a74f4f6e075df18cd83f856d402..93e2355ed30a6b89246e390c57928e31c5490870 100644
--- a/chrome/common/media/cdm_host_file_path.cc
+++ b/chrome/common/media/cdm_host_file_path.cc
@@ -20,7 +20,7 @@
namespace chrome {
-#if defined(GOOGLE_CHROME_BUILD)
+#if defined(GOOGLE_CHROME_BUILD) || !defined(MUON_CHROMIUM_BUILD)
namespace {
diff --git a/chrome/install_static/user_data_dir.cc b/chrome/install_static/user_data_dir.cc
index b5f779d03cfec8ce1db9354d85020acaa10c3a5b..04db5469f8b3705bbf0c36fe6eef5ce1aeaa3355 100644
--- a/chrome/install_static/user_data_dir.cc
+++ b/chrome/install_static/user_data_dir.cc
@@ -74,6 +74,10 @@ bool GetUserDataDirectoryUsingProcessCommandLine(
// Unify this with the Browser Distribution code.
bool GetDefaultUserDataDirectory(const InstallConstants& mode,
std::wstring* result) {
+#if !defined(MUON_CHROMIUM_BUILD)
+ result->append(GetEnvironmentString16(L"CHROME_USER_DATA_DIR"));
+ return true;
+#endif
// This environment variable should be set on Windows Vista and later
// (https://msdn.microsoft.com/library/windows/desktop/dd378457.aspx).
std::wstring user_data_dir = GetEnvironmentString16(L"LOCALAPPDATA");
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc
index ac6a3e41ef2c4e82eab088b39abc0d17c4db0f0e..5149d6638b5146d8dc21aed5cc508d613c26fd69 100644
--- a/chrome/installer/util/browser_distribution.cc
+++ b/chrome/installer/util/browser_distribution.cc
@@ -20,6 +20,10 @@
#include "chrome/installer/util/l10n_string_util.h"
#include "chrome/installer/util/non_updating_app_registration_data.h"
+#if !defined(MUON_CHROMIUM_BUILD)
+#include "chrome/installer/util/muon_distribution.h"
+#endif
+
namespace {
// The BrowserDistribution object is never freed.
@@ -55,6 +59,7 @@ BrowserDistribution* BrowserDistribution::GetOrCreateBrowserDistribution(
BrowserDistribution* BrowserDistribution::GetDistribution() {
BrowserDistribution* dist = NULL;
+#if defined(MUON_CHROMIUM_BUILD)
#if defined(GOOGLE_CHROME_BUILD)
dist = GetOrCreateBrowserDistribution<GoogleChromeDistribution>(
&g_browser_distribution);
@@ -62,7 +67,10 @@ BrowserDistribution* BrowserDistribution::GetDistribution() {
dist = GetOrCreateBrowserDistribution<BrowserDistribution>(
&g_browser_distribution);
#endif
-
+#else
+ dist = GetOrCreateBrowserDistribution<MuonDistribution>(
+ &g_browser_distribution);
+#endif
return dist;
}
diff --git a/chrome/installer/util/prebuild/create_string_rc.py b/chrome/installer/util/prebuild/create_string_rc.py
index d7734d8883c3e438ece3d509b7bb331931831178..6e6cdda19c271de7e5429db02b3e17b2d676b46f 100755
--- a/chrome/installer/util/prebuild/create_string_rc.py
+++ b/chrome/installer/util/prebuild/create_string_rc.py
@@ -109,6 +109,9 @@ MODE_SPECIFIC_STRINGS = {
'chromium': [
'IDS_APP_SHORTCUTS_SUBDIR_NAME',
],
+ 'brave': [
+ 'IDS_APP_SHORTCUTS_SUBDIR_NAME',
+ ],
},
'IDS_INBOUND_MDNS_RULE_DESCRIPTION': {
'google_chrome': [
@@ -120,6 +123,9 @@ MODE_SPECIFIC_STRINGS = {
'chromium': [
'IDS_INBOUND_MDNS_RULE_DESCRIPTION',
],
+ 'brave': [
+ 'IDS_INBOUND_MDNS_RULE_DESCRIPTION',
+ ],
},
'IDS_INBOUND_MDNS_RULE_NAME': {
'google_chrome': [
@@ -131,6 +137,9 @@ MODE_SPECIFIC_STRINGS = {
'chromium': [
'IDS_INBOUND_MDNS_RULE_NAME',
],
+ 'brave': [
+ 'IDS_INBOUND_MDNS_RULE_NAME',
+ ],
},
# In contrast to the strings above, this one (IDS_PRODUCT_NAME) is used
# throughout Chrome in mode-independent contexts. Within the installer (the
@@ -146,6 +155,9 @@ MODE_SPECIFIC_STRINGS = {
'chromium': [
'IDS_PRODUCT_NAME',
],
+ 'brave': [
+ 'IDS_PRODUCT_NAME',
+ ],
},
}
# Note: Update the test expectations in GetBaseMessageIdForMode.GoogleStringIds
diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn
index 82318fb223a441fc0085f152857f8d14641a4aa7..c8549a97d80dcf32572198f833dc1d8ab62b8663 100644
--- a/chrome/renderer/BUILD.gn
+++ b/chrome/renderer/BUILD.gn
@@ -394,6 +394,19 @@ static_library("renderer") {
"resources/extensions/file_system_provider_custom_bindings.js",
]
}
+
+ if (!muon_chromium_build) {
+ sources -= [
+ "content_settings_observer.cc",
+ "content_settings_observer.h",
+ ]
+
+ if (enable_extensions) {
+ sources -= [
+ "extensions/chrome_extensions_dispatcher_delegate.cc",
+ ]
+ }
+ }
}
static_library("test_support") {
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 63e383cba5e1c3d1bc6c9c1a17d27b832c50e5e9..bc9cc80119a4278b86af404d66468e0e1cd12f24 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -1496,6 +1496,7 @@ ChromeContentRendererClient::CreateBrowserPluginDelegate(
#endif
}
+#if 0
void ChromeContentRendererClient::RecordRappor(const std::string& metric,
const std::string& sample) {
if (!rappor_recorder_) {
@@ -1513,6 +1514,7 @@ void ChromeContentRendererClient::RecordRapporURL(const std::string& metric,
}
rappor_recorder_->RecordRapporURL(metric, url);
}
+#endif // 0
void ChromeContentRendererClient::AddImageContextMenuProperties(
const WebURLResponse& response,
diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h
index 6de49b0d3dcecdd31370a85625c621cdd1935f90..16f764b63a41abc05bd3e2d154abd1312cc9db76 100644
--- a/chrome/renderer/chrome_content_renderer_client.h
+++ b/chrome/renderer/chrome_content_renderer_client.h
@@ -187,9 +187,9 @@ class ChromeContentRendererClient : public content::ContentRendererClient {
content::RenderFrame* render_frame,
const std::string& mime_type,
const GURL& original_url) override;
- void RecordRappor(const std::string& metric,
- const std::string& sample) override;
- void RecordRapporURL(const std::string& metric, const GURL& url) override;
+ //void RecordRappor(const std::string& metric,
+ // const std::string& sample) override;
+ //void RecordRapporURL(const std::string& metric, const GURL& url) override;
void AddImageContextMenuProperties(
const blink::WebURLResponse& response,
bool is_image_in_context_a_placeholder_image,
diff --git a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
index 12d432198186daf817c0b903af985b05ce17cda2..ddbfdb1765d6f8505c35a70b9465b99d8245a529 100644
--- a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
+++ b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
@@ -100,11 +100,11 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
// time of the corresponding instance's method calls. Currently these
// interfaces are available only for whitelisted apps which may not have
// access to the other private interfaces.
- switch (message.type()) {
- case PpapiHostMsg_UMA_Create::ID: {
- return base::MakeUnique<PepperUMAHost>(host_, instance, resource);
- }
- }
+ // switch (message.type()) {
+ // case PpapiHostMsg_UMA_Create::ID: {
+ // return base::MakeUnique<PepperUMAHost>(host_, instance, resource);
+ // }
+ // }
return nullptr;
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 3dc16c61c387ab0f7799107f7880f8452820bbfd..0ca1a6134f9f5e9328fb9554d7e6366bbc181f0a 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -862,7 +862,7 @@ if (!is_android) {
]
}