Commit graph

102 commits

Author SHA1 Message Date
Charles Kerr
d663b4eaee
fix: fix gn cpplint warnings (#14583)
* chore: fix cpplint 'include_what_you_use' warnings

Typically by including <memory>, <utility> etc.

* chore: fix 'static/global string constant' warning

Use C style strings instead of std::string.

Style guide forbids non-trivial static / global variables. https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables

/home/charles/electron/electron-gn/src/electron/script/cpplint.js

* refactor: remove global string variables.

Fix 'global string variables are not permitted' linter warnings
by using the base::NoDestructor<> wrapper to make it explicit that
these variables are never destroyed.

The style guide's take on globals with nontrivial destructors:
https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables

* fix: initializer error introduced in last commit

* fix: remove WIP file that was included by accident

* fix: include order

* fix: include order

* fix: include order

* fix: include order, again
2018-09-12 19:25:56 -05:00
Milan Burda
7253c7f843 refactor: move SpecialStoragePolicy from brightray to atom (#13944) 2018-08-21 08:51:04 -07:00
Robo
9989195f19 fix: notify request context shutdown on IO before cleanup (#14058) 2018-08-14 14:07:53 -07:00
Charles Kerr
b9490177da Revert "[WIP] refactor: (Part I) make the ownership of URLRequestContextGetter more clear (#13956)"
This reverts commit 1c0bb06d4a.
2018-08-13 16:16:04 -07:00
Robo
1c0bb06d4a [WIP] refactor: (Part I) make the ownership of URLRequestContextGetter more clear (#13956)
* refactor: desttroy URLRequestContextGetter on IO thread

* Accepts a factory class that can customize the creation of URLRequestContext
* Use a separate request context for media which is derived from the default
* Notify URLRequestContextGetter observers and cleanup on IO thread
* Move most of brightray net/ classes into atom net/

* refactor: remove refs to URLRequestContextGetter on shutdown

* refactor: remove brigtray switches.{cc|h}

* refactor: remove brightray network_delegate.{cc|h}

* refactor: make AtomURLRequestJobFactory the top level factory.

* Allows to use the default handler from content/ for http{s}, ws{s} schemes.
* Removes the storage of job factory in URLRequestContextGetter.
2018-08-13 15:22:45 -07:00
deepak1556
01fdfc4574 Remove Permission manager from brightray
Electron manages its own implementation, this was
missed out when merging the brightray/ component.
2018-06-19 11:46:59 +10:00
Shelley Vohr
49c8c31220
format previously misses .cc files 2018-04-17 21:56:12 -04:00
Shelley Vohr
b05932310b
replace base::MakeUnique with std::make_unique 2018-04-12 08:48:32 -04:00
Robo
171230e45d Cleanup destruction of URLRequestContextGetter (#12305)
- Add Leak detector
 - Indicate shutdown of request context from Browser Context
 - Change stored references to URLRequestContextGetter to use BrowserContext
 - Destroy session properties explicitly
2018-03-30 08:24:55 -05:00
deepak1556
007ea500d0 REVIEW: Re-use devtools network throttling from content layer
https://chromium-review.googlesource.com/c/chromium/src/+/664356
2018-03-20 10:13:15 +03:00
Samuel Attard
e65815e34c Implement GetBackgroundFetchDelegate in brightray::BrowserContext 2018-03-20 10:08:58 +03:00
Samuel Attard
12066a60f3 make_scoped_refptr --> WrapRefCounted 2018-03-20 10:08:58 +03:00
Cheng Zhao
cc6bcb6c81 Fix some flaky tests in CI (#12153)
* Guard whole InitPrefs with ScopedAllowIO

Saw a crash:
0 0x7f8d2f7d918d base::debug::StackTrace::StackTrace()
1 0x7f8d2f7d755c base::debug::StackTrace::StackTrace()
2 0x7f8d2f867caa logging::LogMessage::~LogMessage()
3 0x7f8d2fa157c7 base::ThreadRestrictions::AssertIOAllowed()
4 0x7f8d2f83453a base::OpenFile()
5 0x7f8d2f82a967 base::ReadFileToStringWithMaxSize()
6 0x7f8d2f82ad44 base::ReadFileToString()
7 0x7f8d2f846f73 JSONFileValueDeserializer::ReadFileToString()
8 0x7f8d2f84738c JSONFileValueDeserializer::Deserialize()
9 0x7f8d35a5d1f6 <unknown>
10 0x7f8d35a5c217 JsonPrefStore::ReadPrefs()
11 0x7f8d35a87d3e PrefService::InitFromStorage()
12 0x7f8d35a87c60 PrefService::PrefService()
13 0x7f8d35a91a10 PrefServiceFactory::Create()
14 0x000000e86e1b brightray::BrowserContext::InitPrefs()
15 0x000000c2bd64 atom::AtomBrowserContext::AtomBrowserContext()
16 0x000000c320db atom::AtomBrowserContext::From()
17 0x000000b4b8b5 atom::api::Session::FromPartition()

* Fix done being called twice in setInterval test

The callback passed to browser process is called asyncly, so it is
possible that multiple callbacks has already been scheduled before we
can clearInternval.

* Fix failing test when dir name has special chars

The pdfSource is not escaped while parsedURL.search is.

* Call done with Error instead of string

* Fix crash caused by not removing input observer

Solve crash:
0 libcontent.dylib content::RenderWidgetHostImpl::DispatchInputEventWithLatencyInfo(blink::WebInputEvent const&, ui::LatencyInfo*) + 214
1 libcontent.dylib content::RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 1350
2 libcontent.dylib content::RenderWidgetHostViewMac::ProcessMouseEvent(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 44
3 libcontent.dylib content::RenderWidgetHostInputEventRouter::RouteMouseEvent(content::RenderWidgetHostViewBase*, blink::WebMouseEvent*, ui::LatencyInfo const&) + 1817

* Print detailed error

* Run tests after server is ready
2018-03-07 14:40:27 +09:00
deepak1556
ebb0e46380 REVIEW: create AtomNetworkDelegate on the IO thread 2018-01-02 16:37:08 +09:00
deepak1556
db156865e7 pref store needs to be loaded on a thread that allows IO 2018-01-02 16:37:06 +09:00
Aleksei Kuzmin
7d1c1700f8 Implement GetBrowsingDataRemoverDelegate() for BrowserContext subclasses
https://codereview.chromium.org/2898443002
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
6c7ad3ac58 Remove the dependence on BrowserThread::FILE for
https://codereview.chromium.org/2944313003
2017-11-24 10:58:16 +09:00
Aleksei Kuzmin
b81ae1c36f REVIEW: Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl.
https://codereview.chromium.org/2820163002
2017-11-24 10:58:15 +09:00
Kevin Sawicki
c43c3b3d80 Revert "protocol: use streaming interface between fetcher and requestjob"
This reverts commit 71b5d946e0.
2017-05-26 09:47:22 -07:00
Kevin Sawicki
d7321ed980 Add brightray prefix to include paths from within brightray 2017-05-19 08:46:15 -07:00
Kevin Sawicki
c4608c0f37 Fix build/include_alpha linter violations in brightray 2017-05-19 08:46:15 -07:00
Kevin Sawicki
bb4a61c7ff Remove unused includes 2017-05-19 08:46:15 -07:00
deepak1556
71b5d946e0 protocol: use streaming interface between fetcher and requestjob 2017-05-11 22:52:49 +05:30
Kevin Sawicki
2ece711c2e Format line length to 80 instead of 100 2017-03-23 15:47:30 -07:00
Kevin Sawicki
4ed9f63989 Cleanly shutdown browser context 2017-02-13 11:04:02 -08:00
deepak1556
0b76a9c073 Persist zoom levels per partition 2017-02-10 22:54:32 +05:30
Cheng Zhao
ac4ef926e1 URLRequestContenxtGetter now accepts task runner 2017-01-23 15:43:17 +09:00
deepak1556
dbf4e52e05 persist media device id salt across sessions 2016-12-03 16:47:31 +05:30
Cheng Zhao
ab14221a85 Fix API changes of Chrome 53 2016-09-06 17:22:52 +09:00
deepak1556
de692c9896 bring back fix from #152 2016-07-26 16:32:14 +05:30
Cheng Zhao
4f3e9df055 Merge remote-tracking branch 'origin/master' into chrome52 2016-07-21 05:34:20 -06:00
Cheng Zhao
6413a4c516 Move the ability to create BrowserContext to embedder 2016-07-12 21:39:23 +09:00
Cheng Zhao
4afa3f7206 Add BrowserContext::GetRequestContext 2016-07-04 15:29:43 +09:00
Cheng Zhao
4e9782897c Update to API changes of Chrome 52 2016-07-04 15:06:05 +09:00
Cheng Zhao
f5bfbada97 NetLog should be managed by BrowserClient 2016-05-23 19:02:13 +09:00
Cheng Zhao
0a5c4b8ced Call BrowserContext::Initialize 2016-05-23 12:36:34 +09:00
Cheng Zhao
76d180a80d Adapt to changes of Chrome 51 API changes (Part 2) 2016-05-23 12:28:41 +09:00
Cheng Zhao
851ef398fb Adapt to changes of Chrome 51 API changes 2016-05-23 10:59:07 +09:00
Brian R. Bondy
f8f97687dc Update to new pref service location in components 2016-05-13 11:07:34 +09:00
deepak1556
de60acbfde Fix race initialising DevtoolsNetworkController 2016-04-14 08:57:20 +05:30
Cheng Zhao
d3a39540b5 Fix compilation errors on OS X 2016-03-08 23:28:28 +09:00
Cheng Zhao
baf5f384cd Pass() is deprecated for std::move 2016-03-08 20:59:29 +09:00
Cheng Zhao
75d0bc848d Update to API changes of Chrome 47 2015-12-07 19:55:01 +08:00
Haojian Wu
2981a7e256 Remove storage limitation of WebSQL. 2015-10-12 21:21:45 +08:00
Cheng Zhao
43bfdace86 Merge pull request #152 from atom/register-prefs
Fix RegisterPrefs not working in subclass.
2015-10-06 22:44:32 +08:00
Haojian Wu
73632d4189 Fix RegisterPrefs not working in subclass.
Don't call virtual function in subclass's constructor.
2015-10-06 16:11:28 +08:00
Robo
a1e646f1b3 enabling network emulation in devtools 2015-09-27 21:38:38 +05:30
Cheng Zhao
d2ea3b496d Only store weak ref to BrowserContext 2015-09-05 22:34:42 +08:00
Cheng Zhao
1a8dc77951 Move management of browser context to BrowserContext 2015-09-05 20:52:50 +08:00
Cheng Zhao
58fb166b0b Pass partition name instead of path to BrowserContext 2015-09-05 19:46:55 +08:00