Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: chrome/browser/extensions/webstore_installer.cc

Issue 1485853003: Revert of Remove kuint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint2
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/basictypes.h ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/webstore_installer.cc
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
index e0639e947d1c404c5d85e1d086af310f56ed723e..f824dd688fec4988bb19caf9195518966bb870ba 100644
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -4,12 +4,10 @@
#include "chrome/browser/extensions/webstore_installer.h"
-#include <stdint.h>
-
-#include <limits>
#include <set>
#include <vector>
+#include "base/basictypes.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
@@ -123,8 +121,8 @@
// filename and when the download starts writing to it (think concurrently
// running sharded browser tests installing the same test file, for
// instance).
- std::string random_number = base::Uint64ToString(
- base::RandGenerator(std::numeric_limits<uint16_t>::max()));
+ std::string random_number =
+ base::Uint64ToString(base::RandGenerator(kuint16max));
base::FilePath file =
download_directory.AppendASCII(id + "_" + random_number + ".crx");
@@ -770,14 +768,14 @@
// Use logarithmic bin sizes up to 1 TB.
const int kNumBuckets = 30;
- const int64_t kMaxSizeKb = 1 << kNumBuckets;
+ const int64 kMaxSizeKb = 1 << kNumBuckets;
UMA_HISTOGRAM_CUSTOM_COUNTS(
"Extensions.WebstoreDownload.InterruptReceivedKBytes",
download->GetReceivedBytes() / 1024,
1,
kMaxSizeKb,
kNumBuckets);
- int64_t total_bytes = download->GetTotalBytes();
+ int64 total_bytes = download->GetTotalBytes();
if (total_bytes >= 0) {
UMA_HISTOGRAM_CUSTOM_COUNTS(
"Extensions.WebstoreDownload.InterruptTotalKBytes",
« no previous file with comments | « base/basictypes.h ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698