Commit e711d89c authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Fix some nits in chrome/ code.

Change-Id: I8b811528e1708ac63c5ae66fff9f057e0499adec
Reviewed-on: https://chromium-review.googlesource.com/1215048Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589999}
parent 0a02ada0
......@@ -202,7 +202,7 @@ void RemoveUnregisteredWhitelistsOnTaskRunner(
continue;
// Ignore folders that correspond to registered whitelists.
if (registered_whitelists.count(crx_id) > 0)
if (base::ContainsKey(registered_whitelists, crx_id))
continue;
RecordUncleanUninstall();
......@@ -233,7 +233,7 @@ void RemoveUnregisteredWhitelistsOnTaskRunner(
continue;
// Ignore files that correspond to registered whitelists.
if (registered_whitelists.count(crx_id) > 0)
if (base::ContainsKey(registered_whitelists, crx_id))
continue;
RecordUncleanUninstall();
......@@ -518,7 +518,7 @@ void SupervisedUserWhitelistInstallerImpl::RegisterComponents() {
// previously registered on the command line but isn't anymore.
const base::ListValue* clients = nullptr;
if ((!dict->GetList(kClients, &clients) || clients->empty()) &&
command_line_whitelists.count(id) == 0) {
!base::ContainsKey(command_line_whitelists, id)) {
stale_whitelists.insert(id);
continue;
}
......
......@@ -10,6 +10,7 @@
#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/format_macros.h"
#include "base/macros.h"
#include "base/process/launch.h"
#include "base/process/process.h"
......@@ -489,8 +490,8 @@ class WebRtcAudioQualityBrowserTest : public WebRtcTestBase {
#else
ascii_filename = ref_filename.BaseName().value();
#endif
return base::StringPrintf("%s_segment_%d", ascii_filename.c_str(),
(int)segment_number);
return base::StringPrintf("%s_segment_%" PRIuS, ascii_filename.c_str(),
segment_number);
}
protected:
......@@ -589,6 +590,7 @@ class AudioRecorder {
recording_application_.WaitForExit(&exit_code);
return exit_code == 0;
}
private:
base::Process recording_application_;
};
......
......@@ -6,19 +6,14 @@
#include <fcntl.h>
#include <stddef.h>
#include <memory>
#if defined(USE_GLIB)
#include <glib.h>
#endif
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/base_paths.h"
......@@ -53,6 +48,10 @@
#include "ui/gfx/image/image_family.h"
#include "url/gurl.h"
#if defined(USE_GLIB)
#include <glib.h>
#endif
namespace shell_integration_linux {
const char kXdgSettings[] = "xdg-settings";
......
......@@ -4,6 +4,13 @@
#include "chrome/browser/ui/webui/policy_tool_ui_handler.h"
#include <algorithm>
#include <functional>
#include <limits>
#include <memory>
#include <utility>
#include <vector>
#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
#include "base/json/json_reader.h"
......
......@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_UI_WEBUI_POLICY_TOOL_UI_HANDLER_H_
#define CHROME_BROWSER_UI_WEBUI_POLICY_TOOL_UI_HANDLER_H_
#include <string>
#include "base/files/file_path.h"
#include "chrome/browser/ui/webui/policy_ui_handler.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment