also format missing .cc files

This commit is contained in:
Shelley Vohr 2018-04-17 21:55:30 -04:00
parent 53bdf22c85
commit c6f4bbd143
No known key found for this signature in database
GPG key ID: F13993A75599653C
181 changed files with 4102 additions and 4254 deletions

View file

@ -28,7 +28,8 @@ const char kXdgSettingsDefaultSchemeHandler[] = "default-url-scheme-handler";
bool LaunchXdgUtility(const std::vector<std::string>& argv, int* exit_code) {
*exit_code = EXIT_FAILURE;
int devnull = open("/dev/null", O_RDONLY);
if (devnull < 0) return false;
if (devnull < 0)
return false;
base::LaunchOptions options;
options.fds_to_remap.push_back(std::make_pair(devnull, STDIN_FILENO));
@ -36,7 +37,8 @@ bool LaunchXdgUtility(const std::vector<std::string>& argv, int* exit_code) {
base::Process process = base::LaunchProcess(argv, options);
close(devnull);
if (!process.IsValid()) return false;
if (!process.IsValid())
return false;
return process.WaitForExit(exit_code);
}
@ -67,14 +69,11 @@ void Browser::Focus() {
}
}
void Browser::AddRecentDocument(const base::FilePath& path) {
}
void Browser::AddRecentDocument(const base::FilePath& path) {}
void Browser::ClearRecentDocuments() {
}
void Browser::ClearRecentDocuments() {}
void Browser::SetAppUserModelID(const base::string16& name) {
}
void Browser::SetAppUserModelID(const base::string16& name) {}
bool Browser::SetAsDefaultProtocolClient(const std::string& protocol,
mate::Arguments* args) {
@ -85,7 +84,8 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
mate::Arguments* args) {
std::unique_ptr<base::Environment> env(base::Environment::Create());
if (protocol.empty()) return false;
if (protocol.empty())
return false;
std::vector<std::string> argv;
argv.push_back(kXdgSettings);
@ -96,15 +96,15 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
std::string reply;
int success_code;
bool ran_ok = base::GetAppOutputWithExitCode(base::CommandLine(argv),
&reply, &success_code);
bool ran_ok = base::GetAppOutputWithExitCode(base::CommandLine(argv), &reply,
&success_code);
if (!ran_ok || success_code != EXIT_SUCCESS) return false;
if (!ran_ok || success_code != EXIT_SUCCESS)
return false;
// Allow any reply that starts with "yes".
return base::StartsWith(reply, "yes", base::CompareCase::SENSITIVE)
? true
: false;
return base::StartsWith(reply, "yes", base::CompareCase::SENSITIVE) ? true
: false;
}
// Todo implement
@ -123,8 +123,7 @@ bool Browser::SetBadgeCount(int count) {
}
}
void Browser::SetLoginItemSettings(LoginItemSettings settings) {
}
void Browser::SetLoginItemSettings(LoginItemSettings settings) {}
Browser::LoginItemSettings Browser::GetLoginItemSettings(
const LoginItemSettings& options) {