diff options
author | avi <avi@chromium.org> | 2015-12-22 16:39:26 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-23 00:40:04 +0000 |
commit | c9cec102fb11a2f3ca3156244446da2d3cdc36b8 (patch) | |
tree | b71268f8bd987d4a93d16e674f6e190462791f69 /extensions/browser/guest_view/web_view | |
parent | 389a09adfd1cfd035c37306cc10db23480930c28 (diff) | |
download | chromium_src-c9cec102fb11a2f3ca3156244446da2d3cdc36b8.zip chromium_src-c9cec102fb11a2f3ca3156244446da2d3cdc36b8.tar.gz chromium_src-c9cec102fb11a2f3ca3156244446da2d3cdc36b8.tar.bz2 |
Switch to standard integer types in extensions/browser/.
BUG=138542
TBR=benwells@chromium.org
Review URL: https://codereview.chromium.org/1549643002
Cr-Commit-Position: refs/heads/master@{#366702}
Diffstat (limited to 'extensions/browser/guest_view/web_view')
13 files changed, 42 insertions, 26 deletions
diff --git a/extensions/browser/guest_view/web_view/javascript_dialog_helper.h b/extensions/browser/guest_view/web_view/javascript_dialog_helper.h index adf11cd..804a206 100644 --- a/extensions/browser/guest_view/web_view/javascript_dialog_helper.h +++ b/extensions/browser/guest_view/web_view/javascript_dialog_helper.h @@ -5,6 +5,7 @@ #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_JAVASCRIPT_DIALOG_HELPER_H_ #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_JAVASCRIPT_DIALOG_HELPER_H_ +#include "base/macros.h" #include "content/public/browser/javascript_dialog_manager.h" namespace extensions { diff --git a/extensions/browser/guest_view/web_view/web_ui/web_ui_url_fetcher.h b/extensions/browser/guest_view/web_view/web_ui/web_ui_url_fetcher.h index 28aa466..8124fc6 100644 --- a/extensions/browser/guest_view/web_view/web_ui/web_ui_url_fetcher.h +++ b/extensions/browser/guest_view/web_view/web_ui/web_ui_url_fetcher.h @@ -6,6 +6,7 @@ #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_UI_URL_FETCHER_H #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "net/url_request/url_fetcher_delegate.h" #include "url/gurl.h" diff --git a/extensions/browser/guest_view/web_view/web_view_apitest.cc b/extensions/browser/guest_view/web_view/web_view_apitest.cc index ecdb15a..9896e13 100644 --- a/extensions/browser/guest_view/web_view/web_view_apitest.cc +++ b/extensions/browser/guest_view/web_view/web_view_apitest.cc @@ -7,9 +7,11 @@ #include <utility> #include "base/command_line.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "components/guest_view/browser/guest_view_manager.h" #include "components/guest_view/browser/guest_view_manager_delegate.h" #include "components/guest_view/browser/guest_view_manager_factory.h" diff --git a/extensions/browser/guest_view/web_view/web_view_constants.cc b/extensions/browser/guest_view/web_view/web_view_constants.cc index fff62e8..9ed1ed5 100644 --- a/extensions/browser/guest_view/web_view/web_view_constants.cc +++ b/extensions/browser/guest_view/web_view/web_view_constants.cc @@ -131,13 +131,13 @@ const unsigned int kMaxOutstandingPermissionRequests = 1024; const int kInvalidPermissionRequestID = 0; // ClearData API constants. -const uint32 WEB_VIEW_REMOVE_DATA_MASK_APPCACHE = 1 << 0; -const uint32 WEB_VIEW_REMOVE_DATA_MASK_CACHE = 1 << 1; -const uint32 WEB_VIEW_REMOVE_DATA_MASK_COOKIES = 1 << 2; -const uint32 WEB_VIEW_REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 3; -const uint32 WEB_VIEW_REMOVE_DATA_MASK_INDEXEDDB = 1 << 4; -const uint32 WEB_VIEW_REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 5; -const uint32 WEB_VIEW_REMOVE_DATA_MASK_WEBSQL = 1 << 6; +const uint32_t WEB_VIEW_REMOVE_DATA_MASK_APPCACHE = 1 << 0; +const uint32_t WEB_VIEW_REMOVE_DATA_MASK_CACHE = 1 << 1; +const uint32_t WEB_VIEW_REMOVE_DATA_MASK_COOKIES = 1 << 2; +const uint32_t WEB_VIEW_REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 3; +const uint32_t WEB_VIEW_REMOVE_DATA_MASK_INDEXEDDB = 1 << 4; +const uint32_t WEB_VIEW_REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 5; +const uint32_t WEB_VIEW_REMOVE_DATA_MASK_WEBSQL = 1 << 6; // Other. const char kWebViewContentScriptManagerKeyName[] = diff --git a/extensions/browser/guest_view/web_view/web_view_constants.h b/extensions/browser/guest_view/web_view/web_view_constants.h index 17b1517..6b82c19 100644 --- a/extensions/browser/guest_view/web_view/web_view_constants.h +++ b/extensions/browser/guest_view/web_view/web_view_constants.h @@ -7,7 +7,7 @@ #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONSTANTS_H_ #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONSTANTS_H_ -#include "base/basictypes.h" +#include <stdint.h> namespace webview { @@ -141,13 +141,13 @@ extern const int kInvalidPermissionRequestID; // // Note that these are not in an enum because using enums to declare bitmasks // results in the enum values being signed. -extern const uint32 WEB_VIEW_REMOVE_DATA_MASK_APPCACHE; -extern const uint32 WEB_VIEW_REMOVE_DATA_MASK_CACHE; -extern const uint32 WEB_VIEW_REMOVE_DATA_MASK_COOKIES; -extern const uint32 WEB_VIEW_REMOVE_DATA_MASK_FILE_SYSTEMS; -extern const uint32 WEB_VIEW_REMOVE_DATA_MASK_INDEXEDDB; -extern const uint32 WEB_VIEW_REMOVE_DATA_MASK_LOCAL_STORAGE; -extern const uint32 WEB_VIEW_REMOVE_DATA_MASK_WEBSQL; +extern const uint32_t WEB_VIEW_REMOVE_DATA_MASK_APPCACHE; +extern const uint32_t WEB_VIEW_REMOVE_DATA_MASK_CACHE; +extern const uint32_t WEB_VIEW_REMOVE_DATA_MASK_COOKIES; +extern const uint32_t WEB_VIEW_REMOVE_DATA_MASK_FILE_SYSTEMS; +extern const uint32_t WEB_VIEW_REMOVE_DATA_MASK_INDEXEDDB; +extern const uint32_t WEB_VIEW_REMOVE_DATA_MASK_LOCAL_STORAGE; +extern const uint32_t WEB_VIEW_REMOVE_DATA_MASK_WEBSQL; // Other. extern const char kWebViewContentScriptManagerKeyName[]; diff --git a/extensions/browser/guest_view/web_view/web_view_content_script_manager.h b/extensions/browser/guest_view/web_view/web_view_content_script_manager.h index 0650ec1..fa1dc87 100644 --- a/extensions/browser/guest_view/web_view/web_view_content_script_manager.h +++ b/extensions/browser/guest_view/web_view/web_view_content_script_manager.h @@ -11,6 +11,7 @@ #include <vector> #include "base/callback.h" +#include "base/macros.h" #include "base/supports_user_data.h" #include "extensions/browser/user_script_loader.h" diff --git a/extensions/browser/guest_view/web_view/web_view_find_helper.h b/extensions/browser/guest_view/web_view/web_view_find_helper.h index 2ed0d00..0c622d0 100644 --- a/extensions/browser/guest_view/web_view/web_view_find_helper.h +++ b/extensions/browser/guest_view/web_view/web_view_find_helper.h @@ -8,6 +8,7 @@ #include <map> #include <vector> +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/values.h" #include "content/public/browser/web_contents.h" diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc index ca7c780..452b275 100644 --- a/extensions/browser/guest_view/web_view/web_view_guest.cc +++ b/extensions/browser/guest_view/web_view/web_view_guest.cc @@ -4,11 +4,14 @@ #include "extensions/browser/guest_view/web_view/web_view_guest.h" +#include <stddef.h> + #include <utility> #include "base/message_loop/message_loop.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "components/browsing_data/storage_partition_http_cache_data_remover.h" #include "components/guest_view/browser/guest_view_event.h" #include "components/guest_view/browser/guest_view_manager.h" @@ -77,8 +80,8 @@ namespace { // Returns storage partition removal mask from web_view clearData mask. Note // that storage partition mask is a subset of webview's data removal mask. -uint32 GetStoragePartitionRemovalMask(uint32 web_view_removal_mask) { - uint32 mask = 0; +uint32_t GetStoragePartitionRemovalMask(uint32_t web_view_removal_mask) { + uint32_t mask = 0; if (web_view_removal_mask & webview::WEB_VIEW_REMOVE_DATA_MASK_APPCACHE) mask |= StoragePartition::REMOVE_DATA_MASK_APPCACHE; if (web_view_removal_mask & webview::WEB_VIEW_REMOVE_DATA_MASK_COOKIES) @@ -404,9 +407,9 @@ void WebViewGuest::DidInitialize(const base::DictionaryValue& create_params) { } void WebViewGuest::ClearDataInternal(base::Time remove_since, - uint32 removal_mask, + uint32_t removal_mask, const base::Closure& callback) { - uint32 storage_partition_removal_mask = + uint32_t storage_partition_removal_mask = GetStoragePartitionRemovalMask(removal_mask); if (!storage_partition_removal_mask) { callback.Run(); @@ -506,9 +509,9 @@ void WebViewGuest::WillDestroy() { } bool WebViewGuest::AddMessageToConsole(WebContents* source, - int32 level, + int32_t level, const base::string16& message, - int32 line_no, + int32_t line_no, const base::string16& source_id) { scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); // Log levels are from base/logging.h: LogSeverity. @@ -729,7 +732,7 @@ void WebViewGuest::Terminate() { } bool WebViewGuest::ClearData(base::Time remove_since, - uint32 removal_mask, + uint32_t removal_mask, const base::Closure& callback) { content::RecordAction(UserMetricsAction("WebView.Guest.ClearData")); content::StoragePartition* partition = diff --git a/extensions/browser/guest_view/web_view/web_view_guest.h b/extensions/browser/guest_view/web_view/web_view_guest.h index cc76a67..17012c6 100644 --- a/extensions/browser/guest_view/web_view/web_view_guest.h +++ b/extensions/browser/guest_view/web_view/web_view_guest.h @@ -5,8 +5,11 @@ #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ +#include <stdint.h> + #include <vector> +#include "base/macros.h" #include "base/observer_list.h" #include "components/guest_view/browser/guest_view.h" #include "content/public/browser/javascript_dialog_manager.h" @@ -144,7 +147,7 @@ class WebViewGuest : public guest_view::GuestView<WebViewGuest>, // Partition data that are newer than |removal_since| will be removed. // |removal_mask| corresponds to bitmask in StoragePartition::RemoveDataMask. bool ClearData(const base::Time remove_since, - uint32 removal_mask, + uint32_t removal_mask, const base::Closure& callback); ScriptExecutor* script_executor() { return script_executor_.get(); } @@ -157,7 +160,7 @@ class WebViewGuest : public guest_view::GuestView<WebViewGuest>, ~WebViewGuest() override; void ClearDataInternal(const base::Time remove_since, - uint32 removal_mask, + uint32_t removal_mask, const base::Closure& callback); void OnWebViewNewWindowResponse(int new_window_instance_id, @@ -205,9 +208,9 @@ class WebViewGuest : public guest_view::GuestView<WebViewGuest>, // WebContentsDelegate implementation. bool AddMessageToConsole(content::WebContents* source, - int32 level, + int32_t level, const base::string16& message, - int32 line_no, + int32_t line_no, const base::string16& source_id) final; void CloseContents(content::WebContents* source) final; bool HandleContextMenu(const content::ContextMenuParams& params) final; diff --git a/extensions/browser/guest_view/web_view/web_view_media_access_apitest.cc b/extensions/browser/guest_view/web_view/web_view_media_access_apitest.cc index 5405aaf..dcf4190 100644 --- a/extensions/browser/guest_view/web_view/web_view_media_access_apitest.cc +++ b/extensions/browser/guest_view/web_view/web_view_media_access_apitest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/macros.h" #include "base/strings/stringprintf.h" #include "content/public/browser/web_contents_delegate.h" #include "content/public/test/browser_test_utils.h" diff --git a/extensions/browser/guest_view/web_view/web_view_permission_helper.h b/extensions/browser/guest_view/web_view/web_view_permission_helper.h index fd730fb..90e1cfd 100644 --- a/extensions/browser/guest_view/web_view/web_view_permission_helper.h +++ b/extensions/browser/guest_view/web_view/web_view_permission_helper.h @@ -5,6 +5,7 @@ #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/metrics/user_metrics_action.h" #include "components/guest_view/common/guest_view_constants.h" diff --git a/extensions/browser/guest_view/web_view/web_view_permission_helper_delegate.h b/extensions/browser/guest_view/web_view/web_view_permission_helper_delegate.h index 697bbaf..4f2bdd1 100644 --- a/extensions/browser/guest_view/web_view/web_view_permission_helper_delegate.h +++ b/extensions/browser/guest_view/web_view/web_view_permission_helper_delegate.h @@ -5,6 +5,7 @@ #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DELEGATE_H_ #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DELEGATE_H_ +#include "base/macros.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/common/media_stream_request.h" diff --git a/extensions/browser/guest_view/web_view/web_view_renderer_state.h b/extensions/browser/guest_view/web_view/web_view_renderer_state.h index 7ee5ace..f5b18f5 100644 --- a/extensions/browser/guest_view/web_view/web_view_renderer_state.h +++ b/extensions/browser/guest_view/web_view/web_view_renderer_state.h @@ -18,6 +18,7 @@ #include <string> #include <utility> +#include "base/macros.h" #include "base/memory/singleton.h" namespace extensions { |