Skip to content

Commit a2e1e90

Browse files
committed
rebase to Chromium 68
1 parent c2e6172 commit a2e1e90

File tree

11 files changed

+33
-30
lines changed

11 files changed

+33
-30
lines changed

BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ group("nwjs") {
2323
component("nw_base") {
2424
deps = [
2525
"//base",
26+
"//media:media_buildflags",
2627
"//third_party/zlib/google:zip",
2728
"//url",
2829
":commit_id"

patch/patches/ffmpeg.patch

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
diff --git a/BUILD.gn b/BUILD.gn
2-
index 5439b39693..7fbb854abd 100755
2+
index 494d33fc04..c58e84ba90 100755
33
--- BUILD.gn
44
+++ BUILD.gn
5-
@@ -247,7 +247,7 @@ target(link_target_type, "ffmpeg_internal") {
6-
# On POSIX x86, sanitizers will fail to compiler the H264 CABAC code due to
7-
# insufficient registers unless we disable EBP usage. crbug.com/786760
8-
if (target_cpu == "x86") {
9-
- if (using_sanitizer) {
10-
+ if (true) {
11-
defines += [ "HAVE_EBP_AVAILABLE=0" ]
12-
} else {
13-
defines += [ "HAVE_EBP_AVAILABLE=1" ]
14-
@@ -393,6 +393,12 @@ if (is_component_ffmpeg) {
5+
@@ -239,7 +239,7 @@ target(link_target_type, "ffmpeg_internal") {
6+
# Windows builds can't compile without EBP because we can't omit frame
7+
# pointers like we do on posix.
8+
if (target_cpu == "x86") {
9+
- if (using_sanitizer || is_win) {
10+
+ if (true) {
11+
defines += [ "HAVE_EBP_AVAILABLE=0" ]
12+
} else {
13+
defines += [ "HAVE_EBP_AVAILABLE=1" ]
14+
@@ -390,6 +390,12 @@ if (is_component_ffmpeg) {
1515
# So we can append below and assume they're defined.
1616
ldflags = []
1717

src/api/menu/menu_views.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "base/run_loop.h"
2424
#include "base/values.h"
2525
#include "base/strings/utf_string_conversions.h"
26+
#include "base/message_loop/message_loop_current.h"
2627
#include "content/nw/src/api/object_manager.h"
2728
#include "content/nw/src/api/menuitem/menuitem.h"
2829
#include "content/public/browser/render_frame_host.h"
@@ -148,8 +149,8 @@ void Menu::Popup(int x, int y, content::RenderFrameHost* rfh) {
148149
base::AutoReset<base::Closure> reset_quit_closure(&message_loop_quit_,
149150
base::Closure());
150151

151-
base::MessageLoop* loop = base::MessageLoop::current();
152-
base::MessageLoop::ScopedNestableTaskAllower allow(loop);
152+
//base::MessageLoop* loop = base::MessageLoop::current();
153+
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;
153154
base::RunLoop run_loop;
154155
message_loop_quit_ = run_loop.QuitClosure();
155156

src/api/nw_app_api.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ bool NwAppClearCacheFunction::RunNWSync(base::ListValue* response, std::string*
142142
content::BrowsingDataRemover::ORIGIN_TYPE_UNPROTECTED_WEB,
143143
this);
144144
// BrowsingDataRemover deletes itself.
145-
base::MessageLoop::ScopedNestableTaskAllower allow(
146-
base::MessageLoop::current());
145+
base::MessageLoop::ScopedNestableTaskAllower allow;
146+
147147
run_loop_.Run();
148148
remover->RemoveObserver(this);
149149
return true;

src/browser/menubar_controller.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "content/nw/src/browser/menubar_controller.h"
22

3+
#include "base/message_loop/message_loop_current.h"
34
#include "base/run_loop.h"
45
#include "base/stl_util.h"
56
#include "content/nw/src/browser/menubar_view.h"
@@ -111,8 +112,7 @@ void MenuBarController::RunMenuAt(views::View* view, const gfx::Point& point) {
111112
base::AutoReset<base::Closure> reset_quit_closure(&message_loop_quit_,
112113
base::Closure());
113114

114-
base::MessageLoop* loop = base::MessageLoop::current();
115-
base::MessageLoop::ScopedNestableTaskAllower allow(loop);
115+
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;
116116
base::RunLoop run_loop;
117117
message_loop_quit_ = run_loop.QuitClosure();
118118

src/browser/nw_chrome_browser_hooks.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const char* GetChromiumVersion() {
184184
}
185185

186186
bool GetDirUserData(base::FilePath *user_data_dir) {
187-
return PathService::Get(chrome::DIR_USER_DATA, user_data_dir);
187+
return base::PathService::Get(chrome::DIR_USER_DATA, user_data_dir);
188188
}
189189

190190
void SetTrustAnchorsOnIOThread(const scoped_refptr<net::URLRequestContextGetter>& url_request_getter,
@@ -357,7 +357,7 @@ int MainPartsPreCreateThreadsHook() {
357357
}
358358

359359
}
360-
return content::RESULT_CODE_NORMAL_EXIT;
360+
return service_manager::RESULT_CODE_NORMAL_EXIT;
361361
}
362362

363363
void MainPartsPreMainMessageLoopRunHook() {

src/browser/nw_content_browser_hooks.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "content/public/browser/render_view_host.h"
1919
#include "content/public/renderer/v8_value_converter.h"
2020
#include "content/public/common/web_preferences.h"
21+
#include "content/public/browser/child_process_termination_info.h"
2122

2223
// content/nw
2324
#include "content/nw/src/nw_base.h"
@@ -101,9 +102,9 @@ void MainPartsPostDestroyThreadsHook() {
101102

102103
void RendererProcessTerminatedHook(content::RenderProcessHost* process,
103104
const content::NotificationDetails& details) {
104-
content::RenderProcessHost::RendererClosedDetails* process_details =
105-
content::Details<content::RenderProcessHost::RendererClosedDetails>(details).ptr();
106-
int exit_code = process_details->exit_code;
105+
content::ChildProcessTerminationInfo* process_info =
106+
content::Details<content::ChildProcessTerminationInfo>(details).ptr();
107+
int exit_code = process_info->exit_code;
107108
#if defined(OS_POSIX)
108109
if (WIFEXITED(exit_code))
109110
exit_code = WEXITSTATUS(exit_code);

src/nw_package.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ FilePath GetSelfPath() {
133133

134134
FilePath path;
135135

136-
if (!PathService::Get(base::FILE_EXE, &path)) {
136+
if (!base::PathService::Get(base::FILE_EXE, &path)) {
137137
path = FilePath(command_line->GetProgram());
138138
}
139139

src/nw_version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
#define NW_VERSION_H
2323

2424
#define NW_MAJOR_VERSION 0
25-
#define NW_MINOR_VERSION 31
26-
#define NW_PATCH_VERSION 6
25+
#define NW_MINOR_VERSION 32
26+
#define NW_PATCH_VERSION 0
2727

28-
#define NW_VERSION_IS_RELEASE 1
28+
#define NW_VERSION_IS_RELEASE 0
2929

3030
#ifndef NW_STRINGIFY
3131
#define NW_STRINGIFY(n) NW_STRINGIFY_HELPER(n)

src/nwjs_browsertest.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ class NWWebViewTestBase : public extensions::PlatformAppBrowserTest {
479479
command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc");
480480

481481
extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line);
482-
PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir_);
482+
base::PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir_);
483483
test_data_dir_ = test_data_dir_.Append(FILE_PATH_LITERAL("content"));
484484
test_data_dir_ = test_data_dir_.Append(FILE_PATH_LITERAL("nw"));
485485
test_data_dir_ = test_data_dir_.Append(FILE_PATH_LITERAL("test"));
@@ -825,7 +825,7 @@ class NWAppTest : public extensions::PlatformAppBrowserTest {
825825
~NWAppTest() override {}
826826
void SetUpCommandLine(base::CommandLine* command_line) override {
827827
extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line);
828-
PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir_);
828+
base::PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir_);
829829
test_data_dir_ = test_data_dir_.Append(FILE_PATH_LITERAL("content"));
830830
test_data_dir_ = test_data_dir_.Append(FILE_PATH_LITERAL("nw"));
831831
test_data_dir_ = test_data_dir_.Append(FILE_PATH_LITERAL("test"));

tools/payload.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ void MyComputedHashes::ComputeHashesForContent(const std::string& contents,
151151
hashes->push_back(std::string());
152152
std::string* buffer = &(hashes->back());
153153
buffer->resize(crypto::kSHA256Length);
154-
hash->Finish(base::string_as_array(buffer), buffer->size());
154+
hash->Finish(base::data(*buffer), buffer->size());
155155

156156
// If |contents| is empty, then we want to just exit here.
157157
if (bytes_to_read == 0)
@@ -191,7 +191,7 @@ std::string ComputeTreeHashRoot(const std::vector<std::string>& leaf_hashes,
191191
}
192192
parent_nodes.push_back(std::string(crypto::kSHA256Length, 0));
193193
std::string* output = &(parent_nodes.back());
194-
hash->Finish(base::string_as_array(output), output->size());
194+
hash->Finish(base::data(*output), output->size());
195195
}
196196
current_nodes.swap(parent_nodes);
197197
parent_nodes.clear();

0 commit comments

Comments
 (0)