summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/content_settings/content_settings_pref_provider.cc15
-rw-r--r--chrome/browser/history/download_database.cc3
-rw-r--r--chrome/browser/importer/importer_list.cc3
-rw-r--r--chrome/browser/importer/mork_reader.cc6
-rw-r--r--chrome/browser/ui/webui/print_preview_handler.cc3
-rw-r--r--chrome/browser/ui/webui/task_manager_handler.cc3
-rw-r--r--content/browser/download/save_package.cc6
-rw-r--r--content/common/gpu/media/gpu_video_decode_accelerator.cc3
8 files changed, 27 insertions, 15 deletions
diff --git a/chrome/browser/content_settings/content_settings_pref_provider.cc b/chrome/browser/content_settings/content_settings_pref_provider.cc
index 8a75fab..24a765e 100644
--- a/chrome/browser/content_settings/content_settings_pref_provider.cc
+++ b/chrome/browser/content_settings/content_settings_pref_provider.cc
@@ -607,10 +607,11 @@ void PrefProvider::UpdateObsoleteGeolocationPref(
DictionaryPrefUpdate update(prefs_, prefs::kGeolocationContentSettings);
DictionaryValue* obsolete_geolocation_settings = update.Get();
DictionaryValue* requesting_origin_settings_dictionary = NULL;
- obsolete_geolocation_settings->GetDictionaryWithoutPathExpansion(
- requesting_origin.spec(), &requesting_origin_settings_dictionary);
+ bool settings_found =
+ obsolete_geolocation_settings->GetDictionaryWithoutPathExpansion(
+ requesting_origin.spec(), &requesting_origin_settings_dictionary);
if (setting == CONTENT_SETTING_DEFAULT) {
- if (requesting_origin_settings_dictionary) {
+ if (settings_found) {
requesting_origin_settings_dictionary->RemoveWithoutPathExpansion(
embedding_origin.spec(), NULL);
if (requesting_origin_settings_dictionary->empty()) {
@@ -619,7 +620,7 @@ void PrefProvider::UpdateObsoleteGeolocationPref(
}
}
} else {
- if (!requesting_origin_settings_dictionary) {
+ if (!settings_found) {
requesting_origin_settings_dictionary = new DictionaryValue;
obsolete_geolocation_settings->SetWithoutPathExpansion(
requesting_origin.spec(), requesting_origin_settings_dictionary);
@@ -1084,8 +1085,10 @@ void PrefProvider::SyncObsoletePrefs() {
DCHECK(pattern_pair.first.IsValid() && pattern_pair.second.IsValid());
DictionaryValue* settings_dictionary = NULL;
- pattern_pairs_dictionary->GetDictionaryWithoutPathExpansion(
- key, &settings_dictionary);
+ bool settings_found =
+ pattern_pairs_dictionary->GetDictionaryWithoutPathExpansion(
+ key, &settings_dictionary);
+ DCHECK(settings_found);
int setting_value = 0;
if (settings_dictionary->GetInteger(
diff --git a/chrome/browser/history/download_database.cc b/chrome/browser/history/download_database.cc
index 4b91e3a..6cf6f3a 100644
--- a/chrome/browser/history/download_database.cc
+++ b/chrome/browser/history/download_database.cc
@@ -89,7 +89,8 @@ bool DownloadDatabase::EnsureColumnExists(
bool DownloadDatabase::InitDownloadTable() {
CheckThread();
- meta_table_.Init(&GetDB(), 0, 0);
+ bool success = meta_table_.Init(&GetDB(), 0, 0);
+ DCHECK(success);
meta_table_.GetValue(kNextDownloadId, &next_id_);
if (GetDB().DoesTableExist("downloads")) {
return EnsureColumnExists("end_time", "INTEGER NOT NULL DEFAULT 0") &&
diff --git a/chrome/browser/importer/importer_list.cc b/chrome/browser/importer/importer_list.cc
index 06c78a1..c5e3a84 100644
--- a/chrome/browser/importer/importer_list.cc
+++ b/chrome/browser/importer/importer_list.cc
@@ -127,7 +127,8 @@ void ImporterList::DetectSourceProfiles(
observer_ = observer;
is_observed_ = true;
- BrowserThread::GetCurrentThreadIdentifier(&source_thread_id_);
+ bool res = BrowserThread::GetCurrentThreadIdentifier(&source_thread_id_);
+ DCHECK(res);
BrowserThread::PostTask(
BrowserThread::FILE,
diff --git a/chrome/browser/importer/mork_reader.cc b/chrome/browser/importer/mork_reader.cc
index 035a7056..05e457b 100644
--- a/chrome/browser/importer/mork_reader.cc
+++ b/chrome/browser/importer/mork_reader.cc
@@ -172,8 +172,10 @@ bool MorkReader::ParseMap(const std::string& first_line,
StringMap* map) {
// If the first line is the a=c line (column map), just skip over it.
std::string line(first_line);
- if (StartsWithASCII(line, "< <(a=c)>", true))
- ReadLine(&line);
+ if (StartsWithASCII(line, "< <(a=c)>", true)) {
+ if (!ReadLine(&line))
+ return false;
+ }
std::string key;
do {
diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc
index 10b9f22..4ef3d17 100644
--- a/chrome/browser/ui/webui/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview_handler.cc
@@ -398,7 +398,8 @@ void PrintPreviewHandler::HandlePrint(const ListValue* args) {
settings->GetBoolean(printing::kSettingCloudPrintDialog, &is_cloud_dialog);
if (is_cloud_printer && !open_pdf_in_preview) {
std::string print_ticket;
- args->GetString(1, &print_ticket);
+ bool res = args->GetString(1, &print_ticket);
+ DCHECK(res);
SendCloudPrintJob(*settings, print_ticket);
} else if (print_to_pdf && !open_pdf_in_preview) {
HandlePrintToPdf(*settings);
diff --git a/chrome/browser/ui/webui/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager_handler.cc
index 8306463..eab8ec2a 100644
--- a/chrome/browser/ui/webui/task_manager_handler.cc
+++ b/chrome/browser/ui/webui/task_manager_handler.cc
@@ -332,7 +332,8 @@ static int parseIndex(const Value* value) {
string16 string16_index;
double double_index;
if (value->GetAsString(&string16_index)) {
- base::StringToInt(string16_index, &index);
+ bool converted = base::StringToInt(string16_index, &index);
+ DCHECK(converted);
} else if (value->GetAsDouble(&double_index)) {
index = static_cast<int>(double_index);
} else {
diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc
index dc0ba5d..b7fd176 100644
--- a/content/browser/download/save_package.cc
+++ b/content/browser/download/save_package.cc
@@ -1177,8 +1177,10 @@ void SavePackage::CreateDirectoryOnFileThread(
// If the default html/websites save folder doesn't exist...
if (!file_util::DirectoryExists(website_save_dir)) {
// If the default download dir doesn't exist, create it.
- if (!file_util::DirectoryExists(download_save_dir))
- file_util::CreateDirectory(download_save_dir);
+ if (!file_util::DirectoryExists(download_save_dir)) {
+ bool res = file_util::CreateDirectory(download_save_dir);
+ DCHECK(res);
+ }
save_dir = download_save_dir;
} else {
// If it does exist, use the default save dir param.
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index 1014997..c5dcd19 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -97,7 +97,8 @@ void GpuVideoDecodeAccelerator::NotifyError(
// If we get an error while we're initializing, NotifyInitializeDone won't
// be called, so we need to send the reply (with an error) here.
init_done_msg_->set_reply_error();
- Send(init_done_msg_);
+ if (!Send(init_done_msg_))
+ DLOG(ERROR) << "Send(init_done_msg_) failed";
init_done_msg_ = NULL;
}
if (!Send(new AcceleratedVideoDecoderHostMsg_ErrorNotification(