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

Unified Diff: chrome/browser/banners/app_banner_settings_helper.cc

Issue 2000803003: Use std::unique_ptr for base::DictionaryValue and base::ListValue's internal store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 4 years, 7 months 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 | « cc/test/layer_tree_json_parser.cc ('k') | chrome/browser/chromeos/arc/arc_policy_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/banners/app_banner_settings_helper.cc
diff --git a/chrome/browser/banners/app_banner_settings_helper.cc b/chrome/browser/banners/app_banner_settings_helper.cc
index 0e0f24bf79a45e5b4fc492facbadbd2a082621ea..068a7c509b0ee3e750ee93e80b8581ec54117aed 100644
--- a/chrome/browser/banners/app_banner_settings_helper.cc
+++ b/chrome/browser/banners/app_banner_settings_helper.cc
@@ -334,8 +334,7 @@ void AppBannerSettingsHelper::RecordBannerCouldShowEvent(
// Trim any items that are older than we should care about. For comparisons
// the times are converted to local dates.
base::Time date = BucketTimeToResolution(time, gMinimumMinutesBetweenVisits);
- base::ValueVector::iterator it = could_show_list->begin();
- while (it != could_show_list->end()) {
+ for (auto it = could_show_list->begin(); it != could_show_list->end();) {
if ((*it)->IsType(base::Value::TYPE_DICTIONARY)) {
base::DictionaryValue* internal_value;
double internal_date;
@@ -476,7 +475,7 @@ AppBannerSettingsHelper::GetCouldShowBannerEvents(
if (!app_dict->GetList(event_key, &could_show_list))
return result;
- for (auto value : *could_show_list) {
+ for (const auto& value : *could_show_list) {
if (value->IsType(base::Value::TYPE_DICTIONARY)) {
base::DictionaryValue* internal_value;
double internal_date = 0;
« no previous file with comments | « cc/test/layer_tree_json_parser.cc ('k') | chrome/browser/chromeos/arc/arc_policy_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698