From 50e3bfa764ca3116069cff45ab218e8e38b9e3eb Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 5 Apr 2017 17:34:53 +0900 Subject: [PATCH] Fix API changes of base::Value --- atom/browser/api/atom_api_web_contents.cc | 2 +- atom/browser/common_web_contents_delegate.cc | 12 +++++----- atom/browser/native_window_views.cc | 2 +- atom/browser/net/asar/url_request_asar_job.cc | 2 +- atom/browser/net/js_asker.cc | 4 ++-- .../browser/net/url_request_async_asar_job.cc | 4 ++-- atom/browser/net/url_request_buffer_job.cc | 4 ++-- atom/browser/net/url_request_fetch_job.cc | 2 +- atom/browser/net/url_request_string_job.cc | 4 ++-- atom/browser/node_debugger.cc | 2 +- atom/browser/ui/accelerator_util.cc | 2 +- atom/browser/ui/cocoa/atom_menu_controller.mm | 6 ++--- atom/browser/ui/views/global_menu_bar_x11.cc | 10 ++++---- atom/browser/ui/views/menu_bar.cc | 4 ++-- atom/browser/ui/webui/pdf_viewer_handler.cc | 8 +++---- atom/common/asar/archive.cc | 2 +- .../native_mate_converters/blink_converter.h | 2 +- .../content_converter.cc | 8 +++---- .../v8_value_converter.cc | 24 +++++++++---------- .../v8_value_converter.h | 2 +- .../native_mate_converters/value_converter.cc | 4 ++-- 21 files changed, 55 insertions(+), 55 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index d3e7bae2e412..3152fd33fb4b 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -877,7 +877,7 @@ void WebContents::DevToolsOpened() { devtools_web_contents_.Reset(isolate(), handle.ToV8()); // Set inspected tabID. - base::FundamentalValue tab_id(ID()); + base::Value tab_id(ID()); managed_web_contents()->CallClientFunction( "DevToolsAPI.setInspectedTabId", &tab_id, nullptr, nullptr); diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index a10f959dce90..a9312901229b 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -489,9 +489,9 @@ void CommonWebContentsDelegate::OnDevToolsIndexingWorkCalculated( int request_id, const std::string& file_system_path, int total_work) { - base::FundamentalValue request_id_value(request_id); + base::Value request_id_value(request_id); base::StringValue file_system_path_value(file_system_path); - base::FundamentalValue total_work_value(total_work); + base::Value total_work_value(total_work); web_contents_->CallClientFunction("DevToolsAPI.indexingTotalWorkCalculated", &request_id_value, &file_system_path_value, @@ -502,9 +502,9 @@ void CommonWebContentsDelegate::OnDevToolsIndexingWorked( int request_id, const std::string& file_system_path, int worked) { - base::FundamentalValue request_id_value(request_id); + base::Value request_id_value(request_id); base::StringValue file_system_path_value(file_system_path); - base::FundamentalValue worked_value(worked); + base::Value worked_value(worked); web_contents_->CallClientFunction("DevToolsAPI.indexingWorked", &request_id_value, &file_system_path_value, @@ -515,7 +515,7 @@ void CommonWebContentsDelegate::OnDevToolsIndexingDone( int request_id, const std::string& file_system_path) { devtools_indexing_jobs_.erase(request_id); - base::FundamentalValue request_id_value(request_id); + base::Value request_id_value(request_id); base::StringValue file_system_path_value(file_system_path); web_contents_->CallClientFunction("DevToolsAPI.indexingDone", &request_id_value, @@ -531,7 +531,7 @@ void CommonWebContentsDelegate::OnDevToolsSearchCompleted( for (const auto& file_path : file_paths) { file_paths_value.AppendString(file_path); } - base::FundamentalValue request_id_value(request_id); + base::Value request_id_value(request_id); base::StringValue file_system_path_value(file_system_path); web_contents_->CallClientFunction("DevToolsAPI.searchCompleted", &request_id_value, diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 7e6f23947c29..1b6c4ff2ad83 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -187,7 +187,7 @@ NativeWindowViews::NativeWindowViews( params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; params.bounds = bounds; params.delegate = this; - params.type = views::Widget::InitParams::TYPE_WINDOW; + params.type = views::Widget::InitParams::Type::WINDOW; params.remove_standard_frame = !has_frame(); if (transparent()) diff --git a/atom/browser/net/asar/url_request_asar_job.cc b/atom/browser/net/asar/url_request_asar_job.cc index 8bacf1124bf6..def6dd71dead 100644 --- a/atom/browser/net/asar/url_request_asar_job.cc +++ b/atom/browser/net/asar/url_request_asar_job.cc @@ -185,7 +185,7 @@ std::unique_ptr URLRequestAsarJob::SetUpSourceStream() { // Bug 9936 - .svgz files needs to be decompressed. return base::LowerCaseEqualsASCII(file_path_.Extension(), ".svgz") ? net::GzipSourceStream::Create(std::move(source), - net::SourceStream::TYPE_GZIP) + net::SourceStream::Type::GZIP) : std::move(source); } diff --git a/atom/browser/net/js_asker.cc b/atom/browser/net/js_asker.cc index a7c2eb50b441..0df6bb5c37d7 100644 --- a/atom/browser/net/js_asker.cc +++ b/atom/browser/net/js_asker.cc @@ -59,11 +59,11 @@ void AskForOptions(v8::Isolate* isolate, } bool IsErrorOptions(base::Value* value, int* error) { - if (value->IsType(base::Value::TYPE::DICTIONARY)) { + if (value->IsType(base::Value::Type::DICTIONARY)) { base::DictionaryValue* dict = static_cast(value); if (dict->GetInteger("error", error)) return true; - } else if (value->IsType(base::Value::TYPE_INTEGER)) { + } else if (value->IsType(base::Value::Type::INTEGER)) { if (value->GetAsInteger(error)) return true; } diff --git a/atom/browser/net/url_request_async_asar_job.cc b/atom/browser/net/url_request_async_asar_job.cc index f1b978287f3c..bfe862a3738c 100644 --- a/atom/browser/net/url_request_async_asar_job.cc +++ b/atom/browser/net/url_request_async_asar_job.cc @@ -18,10 +18,10 @@ URLRequestAsyncAsarJob::URLRequestAsyncAsarJob( void URLRequestAsyncAsarJob::StartAsync(std::unique_ptr options) { base::FilePath::StringType file_path; - if (options->IsType(base::Value::TYPE::DICTIONARY)) { + if (options->IsType(base::Value::Type::DICTIONARY)) { static_cast(options.get())->GetString( "path", &file_path); - } else if (options->IsType(base::Value::TYPE_STRING)) { + } else if (options->IsType(base::Value::Type::STRING)) { options->GetAsString(&file_path); } diff --git a/atom/browser/net/url_request_buffer_job.cc b/atom/browser/net/url_request_buffer_job.cc index 670a276dad55..fa848862bb28 100644 --- a/atom/browser/net/url_request_buffer_job.cc +++ b/atom/browser/net/url_request_buffer_job.cc @@ -34,13 +34,13 @@ URLRequestBufferJob::URLRequestBufferJob( void URLRequestBufferJob::StartAsync(std::unique_ptr options) { const base::BinaryValue* binary = nullptr; - if (options->IsType(base::Value::TYPE::DICTIONARY)) { + if (options->IsType(base::Value::Type::DICTIONARY)) { base::DictionaryValue* dict = static_cast(options.get()); dict->GetString("mimeType", &mime_type_); dict->GetString("charset", &charset_); dict->GetBinary("data", &binary); - } else if (options->IsType(base::Value::TYPE_BINARY)) { + } else if (options->IsType(base::Value::Type::BINARY)) { options->GetAsBinary(&binary); } diff --git a/atom/browser/net/url_request_fetch_job.cc b/atom/browser/net/url_request_fetch_job.cc index e69ca56fe3ae..ff426dd08c8e 100644 --- a/atom/browser/net/url_request_fetch_job.cc +++ b/atom/browser/net/url_request_fetch_job.cc @@ -112,7 +112,7 @@ void URLRequestFetchJob::BeforeStartInUI( } void URLRequestFetchJob::StartAsync(std::unique_ptr options) { - if (!options->IsType(base::Value::TYPE::DICTIONARY)) { + if (!options->IsType(base::Value::Type::DICTIONARY)) { NotifyStartError(net::URLRequestStatus( net::URLRequestStatus::FAILED, net::ERR_NOT_IMPLEMENTED)); return; diff --git a/atom/browser/net/url_request_string_job.cc b/atom/browser/net/url_request_string_job.cc index b212e0d4b3b5..60dc323d8adc 100644 --- a/atom/browser/net/url_request_string_job.cc +++ b/atom/browser/net/url_request_string_job.cc @@ -17,13 +17,13 @@ URLRequestStringJob::URLRequestStringJob( } void URLRequestStringJob::StartAsync(std::unique_ptr options) { - if (options->IsType(base::Value::TYPE::DICTIONARY)) { + if (options->IsType(base::Value::Type::DICTIONARY)) { base::DictionaryValue* dict = static_cast(options.get()); dict->GetString("mimeType", &mime_type_); dict->GetString("charset", &charset_); dict->GetString("data", &data_); - } else if (options->IsType(base::Value::TYPE_STRING)) { + } else if (options->IsType(base::Value::Type::STRING)) { options->GetAsString(&data_); } net::URLRequestSimpleJob::Start(); diff --git a/atom/browser/node_debugger.cc b/atom/browser/node_debugger.cc index 9fdeb6099e6a..b16af2012436 100644 --- a/atom/browser/node_debugger.cc +++ b/atom/browser/node_debugger.cc @@ -58,7 +58,7 @@ NodeDebugger::NodeDebugger(v8::Isolate* isolate) // Start a new IO thread. base::Thread::Options options; - options.message_loop_type = base::MessageLoop::TYPE_IO; + options.message_loop_type = base::MessageLoop::Type::IO; if (!thread_.StartWithOptions(options)) { LOG(ERROR) << "Unable to start debugger thread"; return; diff --git a/atom/browser/ui/accelerator_util.cc b/atom/browser/ui/accelerator_util.cc index 9ebc4e108496..3efe269ca441 100644 --- a/atom/browser/ui/accelerator_util.cc +++ b/atom/browser/ui/accelerator_util.cc @@ -73,7 +73,7 @@ void GenerateAcceleratorTable(AcceleratorTable* table, int count = model->GetItemCount(); for (int i = 0; i < count; ++i) { atom::AtomMenuModel::ItemType type = model->GetTypeAt(i); - if (type == atom::AtomMenuModel::TYPE_SUBMENU) { + if (type == atom::AtomMenuModel::Type::SUBMENU) { auto submodel = model->GetSubmenuModelAt(i); GenerateAcceleratorTable(table, submodel); } else { diff --git a/atom/browser/ui/cocoa/atom_menu_controller.mm b/atom/browser/ui/cocoa/atom_menu_controller.mm index d0bbf6a153a3..7d1612fd01e2 100644 --- a/atom/browser/ui/cocoa/atom_menu_controller.mm +++ b/atom/browser/ui/cocoa/atom_menu_controller.mm @@ -87,7 +87,7 @@ Role kRolesMap[] = { const int count = model->GetItemCount(); for (int index = 0; index < count; index++) { - if (model->GetTypeAt(index) == atom::AtomMenuModel::TYPE_SEPARATOR) + if (model->GetTypeAt(index) == atom::AtomMenuModel::Type::SEPARATOR) [self addSeparatorToMenu:menu_ atIndex:index]; else [self addItemToMenu:menu_ atIndex:index fromModel:model]; @@ -109,7 +109,7 @@ Role kRolesMap[] = { const int count = model->GetItemCount(); for (int index = 0; index < count; index++) { - if (model->GetTypeAt(index) == atom::AtomMenuModel::TYPE_SEPARATOR) + if (model->GetTypeAt(index) == atom::AtomMenuModel::Type::SEPARATOR) [self addSeparatorToMenu:menu atIndex:index]; else [self addItemToMenu:menu atIndex:index fromModel:model]; @@ -145,7 +145,7 @@ Role kRolesMap[] = { [item setImage:icon.ToNSImage()]; atom::AtomMenuModel::ItemType type = model->GetTypeAt(index); - if (type == atom::AtomMenuModel::TYPE_SUBMENU) { + if (type == atom::AtomMenuModel::Type::SUBMENU) { // Recursively build a submenu from the sub-model at this index. [item setTarget:nil]; [item setAction:nil]; diff --git a/atom/browser/ui/views/global_menu_bar_x11.cc b/atom/browser/ui/views/global_menu_bar_x11.cc index 266d10b96db9..f489fa0d4699 100644 --- a/atom/browser/ui/views/global_menu_bar_x11.cc +++ b/atom/browser/ui/views/global_menu_bar_x11.cc @@ -225,7 +225,7 @@ void GlobalMenuBarX11::BuildMenuFromModel(AtomMenuModel* model, menuitem_property_set_bool(item, kPropertyVisible, model->IsVisibleAt(i)); AtomMenuModel::ItemType type = model->GetTypeAt(i); - if (type == AtomMenuModel::TYPE_SEPARATOR) { + if (type == AtomMenuModel::Type::SEPARATOR) { menuitem_property_set(item, kPropertyType, kTypeSeparator); } else { std::string label = ui::ConvertAcceleratorsFromWindowsStyle( @@ -236,7 +236,7 @@ void GlobalMenuBarX11::BuildMenuFromModel(AtomMenuModel* model, g_object_set_data(G_OBJECT(item), "model", model); SetMenuItemID(item, i); - if (type == AtomMenuModel::TYPE_SUBMENU) { + if (type == AtomMenuModel::Type::SUBMENU) { menuitem_property_set(item, kPropertyChildrenDisplay, kDisplaySubmenu); g_signal_connect(item, "about-to-show", G_CALLBACK(OnSubMenuShowThunk), this); @@ -248,10 +248,10 @@ void GlobalMenuBarX11::BuildMenuFromModel(AtomMenuModel* model, g_signal_connect(item, "item-activated", G_CALLBACK(OnItemActivatedThunk), this); - if (type == AtomMenuModel::TYPE_CHECK || - type == AtomMenuModel::TYPE_RADIO) { + if (type == AtomMenuModel::Type::CHECK || + type == AtomMenuModel::Type::RADIO) { menuitem_property_set(item, kPropertyToggleType, - type == AtomMenuModel::TYPE_CHECK ? kToggleCheck : kToggleRadio); + type == AtomMenuModel::Type::CHECK ? kToggleCheck : kToggleRadio); menuitem_property_set_int(item, kPropertyToggleState, model->IsItemCheckedAt(i)); } diff --git a/atom/browser/ui/views/menu_bar.cc b/atom/browser/ui/views/menu_bar.cc index 5d9b7152788f..fc65d10099bd 100644 --- a/atom/browser/ui/views/menu_bar.cc +++ b/atom/browser/ui/views/menu_bar.cc @@ -120,7 +120,7 @@ bool MenuBar::GetMenuButtonFromScreenPoint(const gfx::Point& point, for (int i = 0; i < child_count(); ++i) { views::View* view = child_at(i); if (view->bounds().Contains(location) && - (menu_model_->GetTypeAt(i) == AtomMenuModel::TYPE_SUBMENU)) { + (menu_model_->GetTypeAt(i) == AtomMenuModel::Type::SUBMENU)) { *menu_model = menu_model_->GetSubmenuModelAt(i); *button = static_cast(view); return true; @@ -148,7 +148,7 @@ void MenuBar::OnMenuButtonClicked(views::MenuButton* source, int id = source->tag(); AtomMenuModel::ItemType type = menu_model_->GetTypeAt(id); - if (type != AtomMenuModel::TYPE_SUBMENU) { + if (type != AtomMenuModel::Type::SUBMENU) { menu_model_->ActivatedAt(id, 0); return; } diff --git a/atom/browser/ui/webui/pdf_viewer_handler.cc b/atom/browser/ui/webui/pdf_viewer_handler.cc index be2f33730558..fd0ef538ba9d 100644 --- a/atom/browser/ui/webui/pdf_viewer_handler.cc +++ b/atom/browser/ui/webui/pdf_viewer_handler.cc @@ -131,7 +131,7 @@ void PdfViewerHandler::GetDefaultZoom(const base::ListValue* args) { double zoom_level = host_zoom_map->GetDefaultZoomLevel(); ResolveJavascriptCallback( *callback_id, - base::FundamentalValue(content::ZoomLevelToZoomFactor(zoom_level))); + base::Value(content::ZoomLevelToZoomFactor(zoom_level))); } void PdfViewerHandler::GetInitialZoom(const base::ListValue* args) { @@ -145,7 +145,7 @@ void PdfViewerHandler::GetInitialZoom(const base::ListValue* args) { content::HostZoomMap::GetZoomLevel(web_ui()->GetWebContents()); ResolveJavascriptCallback( *callback_id, - base::FundamentalValue(content::ZoomLevelToZoomFactor(zoom_level))); + base::Value(content::ZoomLevelToZoomFactor(zoom_level))); } void PdfViewerHandler::SetZoom(const base::ListValue* args) { @@ -159,7 +159,7 @@ void PdfViewerHandler::SetZoom(const base::ListValue* args) { content::HostZoomMap::SetZoomLevel(web_ui()->GetWebContents(), zoom_level); - ResolveJavascriptCallback(*callback_id, base::FundamentalValue(zoom_level)); + ResolveJavascriptCallback(*callback_id, base::Value(zoom_level)); } void PdfViewerHandler::GetStrings(const base::ListValue* args) { @@ -204,7 +204,7 @@ void PdfViewerHandler::OnZoomLevelChanged( if (change.host == kPdfViewerUIHost) { CallJavascriptFunction( "cr.webUIListenerCallback", base::StringValue("onZoomLevelChanged"), - base::FundamentalValue( + base::Value( content::ZoomLevelToZoomFactor(change.zoom_level))); } } diff --git a/atom/common/asar/archive.cc b/atom/common/asar/archive.cc index d94c97fe3b41..8f75c8fbb572 100644 --- a/atom/common/asar/archive.cc +++ b/atom/common/asar/archive.cc @@ -181,7 +181,7 @@ bool Archive::Init() { std::string error; base::JSONReader reader; std::unique_ptr value(reader.ReadToValue(header)); - if (!value || !value->IsType(base::Value::TYPE::DICTIONARY)) { + if (!value || !value->IsType(base::Value::Type::DICTIONARY)) { LOG(ERROR) << "Failed to parse header: " << error; return false; } diff --git a/atom/common/native_mate_converters/blink_converter.h b/atom/common/native_mate_converters/blink_converter.h index 34156f313e56..7b3a14e83072 100644 --- a/atom/common/native_mate_converters/blink_converter.h +++ b/atom/common/native_mate_converters/blink_converter.h @@ -6,7 +6,7 @@ #define ATOM_COMMON_NATIVE_MATE_CONVERTERS_BLINK_CONVERTER_H_ #include "native_mate/converter.h" -#include "third_party/WebKit/public/web/WebCache.h" +#include "third_party/WebKit/public/platform/WebCache.h" #include "third_party/WebKit/public/web/WebContextMenuData.h" namespace blink { diff --git a/atom/common/native_mate_converters/content_converter.cc b/atom/common/native_mate_converters/content_converter.cc index 7869e37deeea..7ebf4c45d94a 100644 --- a/atom/common/native_mate_converters/content_converter.cc +++ b/atom/common/native_mate_converters/content_converter.cc @@ -213,13 +213,13 @@ Converter>::ToV8( std::unique_ptr post_data_dict( new base::DictionaryValue); auto type = element.type(); - if (type == ResourceRequestBodyImpl::Element::TYPE_BYTES) { + if (type == ResourceRequestBodyImpl::Element::Type::BYTES) { std::unique_ptr bytes( base::BinaryValue::CreateWithCopiedBuffer( element.bytes(), static_cast(element.length()))); post_data_dict->SetString("type", "rawData"); post_data_dict->Set("bytes", std::move(bytes)); - } else if (type == ResourceRequestBodyImpl::Element::TYPE_FILE) { + } else if (type == ResourceRequestBodyImpl::Element::Type::FILE) { post_data_dict->SetString("type", "file"); post_data_dict->SetStringWithoutPathExpansion( "filePath", element.path().AsUTF8Unsafe()); @@ -227,7 +227,7 @@ Converter>::ToV8( post_data_dict->SetInteger("length", static_cast(element.length())); post_data_dict->SetDouble( "modificationTime", element.expected_modification_time().ToDoubleT()); - } else if (type == ResourceRequestBodyImpl::Element::TYPE_FILE_FILESYSTEM) { + } else if (type == ResourceRequestBodyImpl::Element::Type::FILE_FILESYSTEM) { post_data_dict->SetString("type", "fileSystem"); post_data_dict->SetStringWithoutPathExpansion( "fileSystemURL", element.filesystem_url().spec()); @@ -235,7 +235,7 @@ Converter>::ToV8( post_data_dict->SetInteger("length", static_cast(element.length())); post_data_dict->SetDouble( "modificationTime", element.expected_modification_time().ToDoubleT()); - } else if (type == ResourceRequestBodyImpl::Element::TYPE_BLOB) { + } else if (type == ResourceRequestBodyImpl::Element::Type::BLOB) { post_data_dict->SetString("type", "blob"); post_data_dict->SetString("blobUUID", element.blob_uuid()); } diff --git a/atom/common/native_mate_converters/v8_value_converter.cc b/atom/common/native_mate_converters/v8_value_converter.cc index 975527a83803..0286723a9df8 100644 --- a/atom/common/native_mate_converters/v8_value_converter.cc +++ b/atom/common/native_mate_converters/v8_value_converter.cc @@ -167,42 +167,42 @@ base::Value* V8ValueConverter::FromV8Value( v8::Local V8ValueConverter::ToV8ValueImpl( v8::Isolate* isolate, const base::Value* value) const { switch (value->GetType()) { - case base::Value::TYPE_NULL: + case base::Value::Type::NULL: return v8::Null(isolate); - case base::Value::TYPE_BOOLEAN: { + case base::Value::Type::BOOLEAN: { bool val = false; value->GetAsBoolean(&val); return v8::Boolean::New(isolate, val); } - case base::Value::TYPE_INTEGER: { + case base::Value::Type::INTEGER: { int val = 0; value->GetAsInteger(&val); return v8::Integer::New(isolate, val); } - case base::Value::TYPE_DOUBLE: { + case base::Value::Type::DOUBLE: { double val = 0.0; value->GetAsDouble(&val); return v8::Number::New(isolate, val); } - case base::Value::TYPE_STRING: { + case base::Value::Type::STRING: { std::string val; value->GetAsString(&val); return v8::String::NewFromUtf8( isolate, val.c_str(), v8::String::kNormalString, val.length()); } - case base::Value::TYPE_LIST: + case base::Value::Type::LIST: return ToV8Array(isolate, static_cast(value)); - case base::Value::TYPE::DICTIONARY: + case base::Value::Type::DICTIONARY: return ToV8Object(isolate, static_cast(value)); - case base::Value::TYPE_BINARY: + case base::Value::Type::BINARY: return ToArrayBuffer(isolate, static_cast(value)); @@ -314,13 +314,13 @@ base::Value* V8ValueConverter::FromV8ValueImpl( return base::Value::CreateNullValue().release(); if (val->IsBoolean()) - return new base::FundamentalValue(val->ToBoolean()->Value()); + return new base::Value(val->ToBoolean()->Value()); if (val->IsInt32()) - return new base::FundamentalValue(val->ToInt32()->Value()); + return new base::Value(val->ToInt32()->Value()); if (val->IsNumber()) - return new base::FundamentalValue(val->ToNumber()->Value()); + return new base::Value(val->ToNumber()->Value()); if (val->IsString()) { v8::String::Utf8Value utf8(val->ToString()); @@ -490,7 +490,7 @@ base::Value* V8ValueConverter::FromV8Object( // there *is* a "windowId" property, but since it should be an int, code // on the browser which doesn't additionally check for null will fail. // We can avoid all bugs related to this by stripping null. - if (strip_null_from_objects_ && child->IsType(base::Value::TYPE_NULL)) + if (strip_null_from_objects_ && child->IsType(base::Value::Type::NULL)) continue; result->SetWithoutPathExpansion(std::string(*name_utf8, name_utf8.length()), diff --git a/atom/common/native_mate_converters/v8_value_converter.h b/atom/common/native_mate_converters/v8_value_converter.h index 2b8dcf85964f..ae6113cfeb02 100644 --- a/atom/common/native_mate_converters/v8_value_converter.h +++ b/atom/common/native_mate_converters/v8_value_converter.h @@ -10,10 +10,10 @@ #include "v8/include/v8.h" namespace base { -class BinaryValue; class DictionaryValue; class ListValue; class Value; +using BinaryValue = Value; } namespace atom { diff --git a/atom/common/native_mate_converters/value_converter.cc b/atom/common/native_mate_converters/value_converter.cc index c535a06d042a..3ed681367094 100644 --- a/atom/common/native_mate_converters/value_converter.cc +++ b/atom/common/native_mate_converters/value_converter.cc @@ -15,7 +15,7 @@ bool Converter::FromV8(v8::Isolate* isolate, std::unique_ptr converter(new atom::V8ValueConverter); std::unique_ptr value(converter->FromV8Value( val, isolate->GetCurrentContext())); - if (value && value->IsType(base::Value::TYPE::DICTIONARY)) { + if (value && value->IsType(base::Value::Type::DICTIONARY)) { out->Swap(static_cast(value.get())); return true; } else { @@ -36,7 +36,7 @@ bool Converter::FromV8(v8::Isolate* isolate, std::unique_ptr converter(new atom::V8ValueConverter); std::unique_ptr value(converter->FromV8Value( val, isolate->GetCurrentContext())); - if (value->IsType(base::Value::TYPE_LIST)) { + if (value->IsType(base::Value::Type::LIST)) { out->Swap(static_cast(value.get())); return true; } else {