diff options
26 files changed, 56 insertions, 59 deletions
diff --git a/chrome/browser/chromeos/feedback_util.cc b/chrome/browser/chromeos/feedback_util.cc index 18e7e5d..489301fc3 100644 --- a/chrome/browser/chromeos/feedback_util.cc +++ b/chrome/browser/chromeos/feedback_util.cc @@ -34,9 +34,9 @@ void OnGetSystemInformation(Profile* profile, scoped_ptr<FeedbackData::SystemLogsMap> sys_logs( new FeedbackData::SystemLogsMap); - for (extensions::SystemInformationList::const_iterator it = sys_info.begin(); - it != sys_info.end(); ++it) { - (*sys_logs.get())[it->get()->key] = it->get()->value; + for (const extensions::api::feedback_private::SystemInformation& info : + sys_info) { + (*sys_logs.get())[info.key] = info.value; } feedback_data->SetAndCompressSystemInfo(std::move(sys_logs)); diff --git a/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.cc b/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.cc index 887bec7..64a9369 100644 --- a/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.cc +++ b/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.cc @@ -241,11 +241,11 @@ void DashboardPrivateShowPermissionPromptForDelegatedBundleInstallFunction:: BundleInstaller::ItemList items; for (const auto& entry : params_->contents) { BundleInstaller::Item item; - item.id = entry->id; - item.manifest = entry->manifest; - item.localized_name = entry->localized_name; - if (entry->icon_url) - item.icon_url = source_url().Resolve(*entry->icon_url); + item.id = entry.id; + item.manifest = entry.manifest; + item.localized_name = entry.localized_name; + if (entry.icon_url) + item.icon_url = source_url().Resolve(*entry.icon_url); items.push_back(item); } if (items.empty()) { diff --git a/chrome/browser/extensions/api/dial/dial_api.cc b/chrome/browser/extensions/api/dial/dial_api.cc index a0a36ce..7e48a95 100644 --- a/chrome/browser/extensions/api/dial/dial_api.cc +++ b/chrome/browser/extensions/api/dial/dial_api.cc @@ -98,13 +98,11 @@ void DialAPI::OnDialError(const DialRegistry::DialErrorCode code) { void DialAPI::SendEventOnUIThread(const DialRegistry::DeviceList& devices) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - std::vector<linked_ptr<api::dial::DialDevice> > args; - for (DialRegistry::DeviceList::const_iterator it = devices.begin(); - it != devices.end(); ++it) { - linked_ptr<api::dial::DialDevice> api_device = - make_linked_ptr(new api::dial::DialDevice); - it->FillDialDevice(api_device.get()); - args.push_back(api_device); + std::vector<api::dial::DialDevice> args; + for (const DialDeviceData& device : devices) { + api::dial::DialDevice api_device; + device.FillDialDevice(&api_device); + args.push_back(std::move(api_device)); } scoped_ptr<base::ListValue> results = api::dial::OnDeviceList::Create(args); scoped_ptr<Event> event(new Event(events::DIAL_ON_DEVICE_LIST, diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc index 0a297d2..a765a0e 100644 --- a/chrome/browser/extensions/api/downloads/downloads_api.cc +++ b/chrome/browser/extensions/api/downloads/downloads_api.cc @@ -988,12 +988,7 @@ bool DownloadsDownloadFunction::RunAsync() { download_params->set_prompt(*options.save_as.get()); if (options.headers.get()) { - typedef downloads::HeaderNameValuePair HeaderNameValuePair; - for (std::vector<linked_ptr<HeaderNameValuePair> >::const_iterator iter = - options.headers->begin(); - iter != options.headers->end(); - ++iter) { - const HeaderNameValuePair& name_value = **iter; + for (const downloads::HeaderNameValuePair& name_value : *options.headers) { if (!net::HttpUtil::IsValidHeaderName(name_value.name)) { error_ = errors::kInvalidHeaderName; return false; diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc index 4558e41..c08e8a4 100644 --- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc +++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc @@ -11,7 +11,6 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/lazy_instance.h" -#include "base/memory/linked_ptr.h" #include "base/numerics/safe_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/thread_task_runner_handle.h" @@ -673,9 +672,9 @@ bool EasyUnlockPrivateSetRemoteDevicesFunction::RunSync() { Profile* profile = Profile::FromBrowserContext(browser_context()); base::ListValue devices; - for (size_t i = 0; i < params->devices.size(); ++i) { - devices.Append(params->devices[i]->ToValue().release()); - } + for (const easy_unlock_private::Device& device : params->devices) + devices.Append(device.ToValue()); + // Store the BLE device if we are trying out the BLE experiment. if (base::CommandLine::ForCurrentProcess()->HasSwitch( proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery)) { @@ -893,27 +892,25 @@ EasyUnlockPrivateGetUserInfoFunction::~EasyUnlockPrivateGetUserInfoFunction() { bool EasyUnlockPrivateGetUserInfoFunction::RunSync() { EasyUnlockService* service = EasyUnlockService::Get(Profile::FromBrowserContext(browser_context())); - std::vector<linked_ptr<easy_unlock_private::UserInfo> > users; + std::vector<easy_unlock_private::UserInfo> users; const AccountId& account_id = service->GetAccountId(); if (account_id.is_valid()) { - users.push_back( - linked_ptr<easy_unlock_private::UserInfo>( - new easy_unlock_private::UserInfo())); - users[0]->user_id = account_id.GetUserEmail(); - users[0]->logged_in = service->GetType() == EasyUnlockService::TYPE_REGULAR; - users[0]->data_ready = users[0]->logged_in || - service->GetRemoteDevices() != NULL; + easy_unlock_private::UserInfo user; + user.user_id = account_id.GetUserEmail(); + user.logged_in = service->GetType() == EasyUnlockService::TYPE_REGULAR; + user.data_ready = user.logged_in || service->GetRemoteDevices() != NULL; EasyUnlockService::UserSettings user_settings = EasyUnlockService::GetUserSettings(account_id); - users[0]->require_close_proximity = user_settings.require_close_proximity; + user.require_close_proximity = user_settings.require_close_proximity; - users[0]->device_user_id = proximity_auth::CalculateDeviceUserId( + user.device_user_id = proximity_auth::CalculateDeviceUserId( EasyUnlockService::GetDeviceId(), account_id.GetUserEmail()); - users[0]->ble_discovery_enabled = + user.ble_discovery_enabled = base::CommandLine::ForCurrentProcess()->HasSwitch( proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery); + users.push_back(std::move(user)); } results_ = easy_unlock_private::GetUserInfo::Results::Create(users); return true; diff --git a/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc b/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc index 061742f..1772b04 100644 --- a/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc +++ b/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc @@ -29,6 +29,7 @@ #include "ui/base/webui/web_ui_util.h" #include "url/url_util.h" +using extensions::api::feedback_private::SystemInformation; using feedback::FeedbackData; namespace { @@ -235,9 +236,8 @@ bool FeedbackPrivateSendFeedbackFunction::RunAsync() { new FeedbackData::SystemLogsMap); SystemInformationList* sys_info = feedback_info.system_information.get(); if (sys_info) { - for (SystemInformationList::iterator it = sys_info->begin(); - it != sys_info->end(); ++it) - (*sys_logs.get())[it->get()->key] = it->get()->value; + for (const SystemInformation& info : *sys_info) + (*sys_logs)[info.key] = info.value; } feedback_data->SetAndCompressSystemInfo(std::move(sys_logs)); diff --git a/chrome/browser/extensions/api/feedback_private/feedback_private_api.h b/chrome/browser/extensions/api/feedback_private/feedback_private_api.h index bf21cfb..bab1831 100644 --- a/chrome/browser/extensions/api/feedback_private/feedback_private_api.h +++ b/chrome/browser/extensions/api/feedback_private/feedback_private_api.h @@ -14,8 +14,6 @@ namespace extensions { class FeedbackService; -using extensions::api::feedback_private::SystemInformation; - class FeedbackPrivateAPI : public BrowserContextKeyedAPI { public: explicit FeedbackPrivateAPI(content::BrowserContext* context); @@ -93,7 +91,7 @@ class FeedbackPrivateGetSystemInformationFunction private: void OnCompleted( - const std::vector<linked_ptr<SystemInformation> >& sys_info); + const std::vector<api::feedback_private::SystemInformation>& sys_info); }; class FeedbackPrivateSendFeedbackFunction diff --git a/chrome/browser/extensions/api/feedback_private/feedback_service.cc b/chrome/browser/extensions/api/feedback_private/feedback_service.cc index 9bd1e5f..13a7cbd 100644 --- a/chrome/browser/extensions/api/feedback_private/feedback_service.cc +++ b/chrome/browser/extensions/api/feedback_private/feedback_service.cc @@ -15,6 +15,7 @@ #include "content/public/browser/browser_thread.h" using content::BrowserThread; +using extensions::api::feedback_private::SystemInformation; using feedback::FeedbackData; namespace extensions { @@ -28,10 +29,10 @@ void PopulateSystemInfo(SystemInformationList* sys_info_list, sys_info_value.Set("key", new base::StringValue(key)); sys_info_value.Set("value", new base::StringValue(value)); - linked_ptr<SystemInformation> sys_info(new SystemInformation()); - SystemInformation::Populate(sys_info_value, sys_info.get()); + SystemInformation sys_info; + SystemInformation::Populate(sys_info_value, &sys_info); - sys_info_list->push_back(sys_info); + sys_info_list->push_back(std::move(sys_info)); } } // namespace diff --git a/chrome/browser/extensions/api/feedback_private/feedback_service.h b/chrome/browser/extensions/api/feedback_private/feedback_service.h index d806c77..1921143 100644 --- a/chrome/browser/extensions/api/feedback_private/feedback_service.h +++ b/chrome/browser/extensions/api/feedback_private/feedback_service.h @@ -20,11 +20,10 @@ class Profile; -using extensions::api::feedback_private::SystemInformation; - namespace extensions { -using SystemInformationList = std::vector<linked_ptr<SystemInformation>>; +using SystemInformationList = + std::vector<api::feedback_private::SystemInformation>; // The feedback service provides the ability to gather the various pieces of // data needed to send a feedback report and then send the report once all diff --git a/chrome/common/extensions/api/cryptotoken_private.idl b/chrome/common/extensions/api/cryptotoken_private.idl index 8a091bb..f424a25 100644 --- a/chrome/common/extensions/api/cryptotoken_private.idl +++ b/chrome/common/extensions/api/cryptotoken_private.idl @@ -4,7 +4,7 @@ // <code>chrome.cryptotokenPrivate</code> API that provides hooks to Chrome to // be used by cryptotoken component extension. -namespace cryptotokenPrivate { +[use_movable_types=true] namespace cryptotokenPrivate { // Callback for appId check callback AppIdCallback = void(boolean result); diff --git a/chrome/common/extensions/api/dashboard_private.json b/chrome/common/extensions/api/dashboard_private.json index 30e9e24..fc11358 100644 --- a/chrome/common/extensions/api/dashboard_private.json +++ b/chrome/common/extensions/api/dashboard_private.json @@ -6,6 +6,7 @@ { "namespace":"dashboardPrivate", "description": "none", + "compiler_options": {"use_movable_types": true}, "types": [ { "id": "Result", diff --git a/chrome/common/extensions/api/data_reduction_proxy.json b/chrome/common/extensions/api/data_reduction_proxy.json index 4c96518..1742e59 100644 --- a/chrome/common/extensions/api/data_reduction_proxy.json +++ b/chrome/common/extensions/api/data_reduction_proxy.json @@ -6,6 +6,7 @@ { "namespace": "dataReductionProxy", "description": "Use the <code>chrome.dataReductionProxy</code> API to control the data reduction proxy and access usage metrics. This API relies on the <a href='types#ChromeSetting'>ChromeSetting prototype of the type API</a> for getting and setting Chrome's configuration.", + "compiler_options": {"use_movable_types": true}, "properties": { "spdyProxyEnabled": { "nocompile": true, diff --git a/chrome/common/extensions/api/debugger.json b/chrome/common/extensions/api/debugger.json index cf4e7b8..c0cff6f 100644 --- a/chrome/common/extensions/api/debugger.json +++ b/chrome/common/extensions/api/debugger.json @@ -6,6 +6,7 @@ { "namespace": "debugger", "description": "The <code>chrome.debugger</code> API serves as an alternate transport for Chrome's <a href='https://developer.chrome.com/devtools/docs/debugger-protocol'>remote debugging protocol</a>. Use <code>chrome.debugger</code> to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc. Use the Debuggee <code>tabId</code> to target tabs with sendCommand and route events by <code>tabId</code> from onEvent callbacks.", + "compiler_options": {"use_movable_types": true}, "types": [ { "id": "Debuggee", diff --git a/chrome/common/extensions/api/declarative_content.json b/chrome/common/extensions/api/declarative_content.json index c84a29a..a857103 100644 --- a/chrome/common/extensions/api/declarative_content.json +++ b/chrome/common/extensions/api/declarative_content.json @@ -6,6 +6,7 @@ { "namespace": "declarativeContent", "description": "Use the <code>chrome.declarativeContent</code> API to take actions depending on the content of a page, without requiring permission to read the page's content.", + "compiler_options": {"use_movable_types": true}, "types": [ { "id": "ImageDataType", diff --git a/chrome/common/extensions/api/desktop_capture.json b/chrome/common/extensions/api/desktop_capture.json index 5b9ff00..359b7da 100644 --- a/chrome/common/extensions/api/desktop_capture.json +++ b/chrome/common/extensions/api/desktop_capture.json @@ -6,6 +6,7 @@ { "namespace": "desktopCapture", "description": "Desktop Capture API that can be used to capture content of screen, individual windows or tabs.", + "compiler_options": {"use_movable_types": true}, "types": [ { "id": "DesktopCaptureSourceType", diff --git a/chrome/common/extensions/api/dial.idl b/chrome/common/extensions/api/dial.idl index d16fdfd..fa2abac 100644 --- a/chrome/common/extensions/api/dial.idl +++ b/chrome/common/extensions/api/dial.idl @@ -4,7 +4,7 @@ // Use the <code>chrome.dial</code> API to discover devices that support DIAL. // Protocol specification: http://www.dial-multiscreen.org/ -namespace dial { +[use_movable_types=true] namespace dial { // Represents a unique device that responded to a DIAL discovery request. dictionary DialDevice { diff --git a/chrome/common/extensions/api/downloads.idl b/chrome/common/extensions/api/downloads.idl index 0381c88..1ff6915 100644 --- a/chrome/common/extensions/api/downloads.idl +++ b/chrome/common/extensions/api/downloads.idl @@ -4,7 +4,7 @@ // Use the <code>chrome.downloads</code> API to programmatically initiate, // monitor, manipulate, and search for downloads. -[permissions=downloads] +[permissions=downloads,use_movable_types=true] namespace downloads { [inline_doc] dictionary HeaderNameValuePair { // Name of the HTTP header. diff --git a/chrome/common/extensions/api/downloads_internal.idl b/chrome/common/extensions/api/downloads_internal.idl index bbbfbcd1..7dab5a0 100644 --- a/chrome/common/extensions/api/downloads_internal.idl +++ b/chrome/common/extensions/api/downloads_internal.idl @@ -3,7 +3,7 @@ // found in the LICENSE file. // downloadsInternal -[nodoc=true] +[nodoc=true,use_movable_types=true] namespace downloadsInternal { interface Functions { // Secretly called when onDeterminingFilename handlers return. diff --git a/chrome/common/extensions/api/easy_unlock_private.idl b/chrome/common/extensions/api/easy_unlock_private.idl index 0359bd8..9f86bb5 100644 --- a/chrome/common/extensions/api/easy_unlock_private.idl +++ b/chrome/common/extensions/api/easy_unlock_private.idl @@ -4,7 +4,7 @@ // <code>chrome.easyUnlockPrivate</code> API that provides hooks to Chrome to // be used by Easy Unlock component app. -namespace easyUnlockPrivate { +[use_movable_types=true] namespace easyUnlockPrivate { // Signature algorithms supported by the crypto library methods used by // Easy Unlock. enum SignatureType { diff --git a/chrome/common/extensions/api/echo_private.json b/chrome/common/extensions/api/echo_private.json index f85c3ce..bef972b 100644 --- a/chrome/common/extensions/api/echo_private.json +++ b/chrome/common/extensions/api/echo_private.json @@ -6,7 +6,8 @@ { "namespace": "echoPrivate", "compiler_options": { - "implemented_in": "chrome/browser/chromeos/extensions/echo_private_api.h" + "implemented_in": "chrome/browser/chromeos/extensions/echo_private_api.h", + "use_movable_types": true }, "description": "none", "functions": [ diff --git a/chrome/common/extensions/api/enterprise_device_attributes.idl b/chrome/common/extensions/api/enterprise_device_attributes.idl index 1960c4d..e3a14e5 100644 --- a/chrome/common/extensions/api/enterprise_device_attributes.idl +++ b/chrome/common/extensions/api/enterprise_device_attributes.idl @@ -4,7 +4,7 @@ // Use the <code>chrome.enterprise.deviceAttributes</code> API to read device // attributes. -namespace enterprise.deviceAttributes { +[use_movable_types=true] namespace enterprise.deviceAttributes { callback GetDirectoryDeviceIdCallback = void (DOMString deviceId); interface Functions { diff --git a/chrome/common/extensions/api/enterprise_platform_keys.idl b/chrome/common/extensions/api/enterprise_platform_keys.idl index bb5cfb1..ceef3b7 100644 --- a/chrome/common/extensions/api/enterprise_platform_keys.idl +++ b/chrome/common/extensions/api/enterprise_platform_keys.idl @@ -7,7 +7,7 @@ // certificates will be managed by the platform and can be used for TLS // authentication, network access or by other extension through // $(ref:platformKeys chrome.platformKeys). -[platforms = ("chromeos")] +[platforms = ("chromeos"), use_movable_types=true] namespace enterprise.platformKeys { [nocompile, noinline_doc] dictionary Token { // Uniquely identifies this <code>Token</code>. diff --git a/chrome/common/extensions/api/enterprise_platform_keys_internal.idl b/chrome/common/extensions/api/enterprise_platform_keys_internal.idl index 7d35f90..2fc35e1 100644 --- a/chrome/common/extensions/api/enterprise_platform_keys_internal.idl +++ b/chrome/common/extensions/api/enterprise_platform_keys_internal.idl @@ -4,7 +4,8 @@ // Internal API for platform keys and certificate management. [ platforms = ("chromeos"), - implemented_in = "chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h" ] + implemented_in = "chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h", + use_movable_types=true ] namespace enterprise.platformKeysInternal { // Invoked by <code>getTokens</code>. // |tokenIds| The list of IDs of the avialable Tokens. diff --git a/chrome/common/extensions/api/enterprise_platform_keys_private.json b/chrome/common/extensions/api/enterprise_platform_keys_private.json index 5b77df6..50d0b04 100644 --- a/chrome/common/extensions/api/enterprise_platform_keys_private.json +++ b/chrome/common/extensions/api/enterprise_platform_keys_private.json @@ -6,6 +6,7 @@ { "namespace": "enterprise.platformKeysPrivate", "description": "none", + "compiler_options": {"use_movable_types": true}, "functions": [ { "name": "challengeMachineKey", diff --git a/chrome/common/extensions/api/extension.json b/chrome/common/extensions/api/extension.json index c83f89e..ece6d32 100644 --- a/chrome/common/extensions/api/extension.json +++ b/chrome/common/extensions/api/extension.json @@ -7,7 +7,8 @@ "namespace": "extension", "description": "The <code>chrome.extension</code> API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in <a href='messaging'>Message Passing</a>.", "compiler_options": { - "implemented_in": "chrome/browser/extensions/api/module/module.h" + "implemented_in": "chrome/browser/extensions/api/module/module.h", + "use_movable_types": true }, "properties": { "lastError": { diff --git a/chrome/common/extensions/api/feedback_private.idl b/chrome/common/extensions/api/feedback_private.idl index 54990c3..a58b4b4 100644 --- a/chrome/common/extensions/api/feedback_private.idl +++ b/chrome/common/extensions/api/feedback_private.idl @@ -4,7 +4,7 @@ // Use the <code>chrome.feedbackPrivate</code> API to provide Chrome [OS] // feedback to the Google Feedback servers. -namespace feedbackPrivate { +[use_movable_types=true] namespace feedbackPrivate { dictionary AttachedFile { DOMString name; |