int32 => int32_t
authorPaul Betts <paul@paulbetts.org>
Tue, 8 Mar 2016 04:40:10 +0000 (20:40 -0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 10 Mar 2016 08:06:21 +0000 (17:06 +0900)
atom/browser/api/atom_api_download_item.cc
atom/browser/api/atom_api_session.cc
atom/browser/api/atom_api_web_contents.cc
atom/browser/api/atom_api_web_contents.h
atom/browser/atom_download_manager_delegate.cc
atom/browser/atom_download_manager_delegate.h
atom/common/api/atom_api_clipboard.cc
atom/common/asar/archive.cc
atom/common/asar/archive.h
atom/common/native_mate_converters/v8_value_converter.cc
atom/renderer/api/atom_api_spell_check_client.cc

index 5a8befc9d1dbcc46f2e96e4418ae0c62fb1e1d2f..de3a5b348eed977442bc443a9ee5a4dc2cdb2250 100644 (file)
@@ -53,7 +53,7 @@ namespace {
 using WrapDownloadItemCallback = base::Callback<void(v8::Local<v8::Value>)>;
 WrapDownloadItemCallback g_wrap_download_item;
 
-std::map<uint32, linked_ptr<v8::Global<v8::Value>>> g_download_item_objects;
+std::map<uint32_t, linked_ptr<v8::Global<v8::Value>>> g_download_item_objects;
 
 }  // namespace
 
index e5c5198f03416b292ed1f127f6719864214996d9..0f104c760724cb83d421f9ed0225eaa8568898fe 100644 (file)
@@ -49,12 +49,12 @@ namespace {
 
 struct ClearStorageDataOptions {
   GURL origin;
-  uint32 storage_types = StoragePartition::REMOVE_DATA_MASK_ALL;
-  uint32 quota_types = StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL;
+  uint32_t storage_types = StoragePartition::REMOVE_DATA_MASK_ALL;
+  uint32_t quota_types = StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL;
 };
 
-uint32 GetStorageMask(const std::vector<std::string>& storage_types) {
-  uint32 storage_mask = 0;
+uint32_t GetStorageMask(const std::vector<std::string>& storage_types) {
+  uint32_t storage_mask = 0;
   for (const auto& it : storage_types) {
     auto type = base::ToLowerASCII(it);
     if (type == "appcache")
@@ -77,8 +77,8 @@ uint32 GetStorageMask(const std::vector<std::string>& storage_types) {
   return storage_mask;
 }
 
-uint32 GetQuotaMask(const std::vector<std::string>& quota_types) {
-  uint32 quota_mask = 0;
+uint32_t GetQuotaMask(const std::vector<std::string>& quota_types) {
+  uint32_t quota_mask = 0;
   for (const auto& it : quota_types) {
     auto type = base::ToLowerASCII(it);
     if (type == "temporary")
index 12e0c56ceb6689597e9b10b06d9f07c844a1e11a..1f4c9f92b35be72042ed6404703742ec4d3fd29e 100644 (file)
@@ -303,9 +303,9 @@ WebContents::~WebContents() {
 }
 
 bool WebContents::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) {
   if (type_ == BROWSER_WINDOW) {
     return false;
@@ -998,8 +998,8 @@ void WebContents::ReplaceMisspelling(const base::string16& word) {
   web_contents()->ReplaceMisspelling(word);
 }
 
-uint32 WebContents::FindInPage(mate::Arguments* args) {
-  uint32 request_id = GetNextRequestId();
+uint32_t WebContents::FindInPage(mate::Arguments* args) {
+  uint32_t request_id = GetNextRequestId();
   base::string16 search_text;
   blink::WebFindOptions options;
   if (!args->GetNext(&search_text) || search_text.empty()) {
index a785e1c070db645559ec0920c579e956b929fdc8..a008a84913bbdadf06c69574ee1271857d628c25 100644 (file)
@@ -110,7 +110,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
   void Unselect();
   void Replace(const base::string16& word);
   void ReplaceMisspelling(const base::string16& word);
-  uint32 FindInPage(mate::Arguments* args);
+  uint32_t FindInPage(mate::Arguments* args);
   void StopFindInPage(content::StopFindAction action);
 
   // Focus.
@@ -162,9 +162,9 @@ class WebContents : public mate::TrackableObject<WebContents>,
 
   // content::WebContentsDelegate:
   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) override;
   bool ShouldCreateWebContents(
       content::WebContents* web_contents,
@@ -270,7 +270,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
 
   AtomBrowserContext* GetBrowserContext() const;
 
-  uint32 GetNextRequestId() {
+  uint32_t GetNextRequestId() {
     return ++request_id_;
   }
 
@@ -299,7 +299,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
   Type type_;
 
   // Request id used for findInPage request.
-  uint32 request_id_;
+  uint32_t request_id_;
 
   DISALLOW_COPY_AND_ASSIGN(WebContents);
 };
index f5bdbbd8598da0bfc112d685928ae63a7a971b1e..16c0cf708b856286ed177b976141b8c87ad9a403 100644 (file)
@@ -60,7 +60,7 @@ void AtomDownloadManagerDelegate::CreateDownloadPath(
 }
 
 void AtomDownloadManagerDelegate::OnDownloadPathGenerated(
-    uint32 download_id,
+    uint32_t download_id,
     const content::DownloadTargetCallback& callback,
     const base::FilePath& default_path) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -160,7 +160,7 @@ bool AtomDownloadManagerDelegate::ShouldOpenDownload(
 
 void AtomDownloadManagerDelegate::GetNextId(
     const content::DownloadIdCallback& callback) {
-  static uint32 next_id = content::DownloadItem::kInvalidId + 1;
+  static uint32_t next_id = content::DownloadItem::kInvalidId + 1;
   callback.Run(next_id++);
 }
 
index 2df3a7d45a6b29107159aacce63678c3a4deb662..5ea3d50d5aee391e9eb8b975055e81e7b9a757b6 100644 (file)
@@ -31,7 +31,7 @@ class AtomDownloadManagerDelegate : public content::DownloadManagerDelegate {
                           const std::string& mime_type,
                           const base::FilePath& path,
                           const CreateDownloadPathCallback& callback);
-  void OnDownloadPathGenerated(uint32 download_id,
+  void OnDownloadPathGenerated(uint32_t download_id,
                                const content::DownloadTargetCallback& callback,
                                const base::FilePath& default_path);
 
index 5186e22c8d9e7399334fe457688d5fd99d3eae72..1f75f2cd3fe77ba3dd4c43ae0ef20d3d9ef04ad5 100644 (file)
@@ -109,8 +109,8 @@ base::string16 ReadHtml(mate::Arguments* args) {
   base::string16 data;
   base::string16 html;
   std::string url;
-  uint32 start;
-  uint32 end;
+  uint32_t start;
+  uint32_t end;
   ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
   clipboard->ReadHTML(GetClipboardType(args), &html, &url, &start, &end);
   data = html.substr(start, end - start);
index 35451410a8d9cba7622de02bb61cdc0a281aa9e0..b5a9603acb146ebcab4a6636d8d09abe605ee4e3 100644 (file)
@@ -90,12 +90,12 @@ bool GetNodeFromPath(std::string path,
 }
 
 bool FillFileInfoWithNode(Archive::FileInfo* info,
-                          uint32 header_size,
+                          uint32_t header_size,
                           const base::DictionaryValue* node) {
   int size;
   if (!node->GetInteger("size", &size))
     return false;
-  info->size = static_cast<uint32>(size);
+  info->size = static_cast<uint32_t>(size);
 
   if (node->GetBoolean("unpacked", &info->unpacked) && info->unpacked)
     return true;
@@ -157,8 +157,8 @@ bool Archive::Init() {
     return false;
   }
 
-  uint32 size;
-  if (!base::PickleIterator(base::Pickle(buf.data(), buf.size())).ReadUInt32(
+  uint32_t size;
+  if (!base::PickleIterator(base::Pickle(buf.data(), buf.size())).ReadUint32_t(
           &size)) {
     LOG(ERROR) << "Failed to parse header size from " << path_.value();
     return false;
index de5b9de605a381995cc98aef91a1eef9fbf4e3c7..6bde7bd1ff25416349ac778b9bcf7adfc0093f29 100644 (file)
@@ -28,7 +28,7 @@ class Archive {
     FileInfo() : unpacked(false), executable(false), size(0), offset(0) {}
     bool unpacked;
     bool executable;
-    uint32 size;
+    uint32_t size;
     uint64 offset;
   };
 
@@ -71,7 +71,7 @@ class Archive {
   base::FilePath path_;
   base::File file_;
   int fd_;
-  uint32 header_size_;
+  uint32_t header_size_;
   scoped_ptr<base::DictionaryValue> header_;
 
   // Cached external temporary files.
index 1a729dda535e8635da93af9974ce8ed4829bcb4d..b35f1eb6a0bc4aac04ca403cf6a754989c00b132 100644 (file)
@@ -169,7 +169,7 @@ v8::Local<v8::Value> V8ValueConverter::ToV8Array(
     CHECK(!child_v8.IsEmpty());
 
     v8::TryCatch try_catch;
-    result->Set(static_cast<uint32>(i), child_v8);
+    result->Set(static_cast<uint32_t>(i), child_v8);
     if (try_catch.HasCaught())
       LOG(ERROR) << "Setter for index " << i << " threw an exception.";
   }
@@ -222,8 +222,8 @@ base::Value* V8ValueConverter::FromV8ValueImpl(
   if (val->IsBoolean())
     return new base::FundamentalValue(val->ToBoolean()->Value());
 
-  if (val->IsInt32())
-    return new base::FundamentalValue(val->ToInt32()->Value());
+  if (val->Isint32_t())
+    return new base::FundamentalValue(val->Toint32_t()->Value());
 
   if (val->IsNumber())
     return new base::FundamentalValue(val->ToNumber()->Value());
@@ -298,7 +298,7 @@ base::Value* V8ValueConverter::FromV8Array(
   base::ListValue* result = new base::ListValue();
 
   // Only fields with integer keys are carried over to the ListValue.
-  for (uint32 i = 0; i < val->Length(); ++i) {
+  for (uint32_t i = 0; i < val->Length(); ++i) {
     v8::TryCatch try_catch;
     v8::Local<v8::Value> child_v8 = val->Get(i);
     if (try_catch.HasCaught()) {
@@ -345,7 +345,7 @@ base::Value* V8ValueConverter::FromV8Object(
   scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
   v8::Local<v8::Array> property_names(val->GetOwnPropertyNames());
 
-  for (uint32 i = 0; i < property_names->Length(); ++i) {
+  for (uint32_t i = 0; i < property_names->Length(); ++i) {
     v8::Local<v8::Value> key(property_names->Get(i));
 
     // Extend this test to cover more types as necessary and if sensible.
index 25d1e30b0aaccba3453c8cc522a16e5223e5851e..51c5f721f027fa100c878f1b71260d394d8a4d6f 100644 (file)
@@ -27,7 +27,7 @@ bool HasWordCharacters(const base::string16& text, int index) {
   const base::char16* data = text.data();
   int length = text.length();
   while (index < length) {
-    uint32 code = 0;
+    uint32_t code = 0;
     U16_NEXT(data, index, length, code);
     UErrorCode error = U_ZERO_ERROR;
     if (uscript_getScript(code, &error) != USCRIPT_COMMON)