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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc

Issue 843643002: Cleanup: Remove some redundant container clear() calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Disable everything on windows only. http://crbug.com/306144 5 // Disable everything on windows only. http://crbug.com/306144
6 #ifndef OS_WIN 6 #ifndef OS_WIN
7 7
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 ~DownloadsEventsListener() override { 88 ~DownloadsEventsListener() override {
89 registrar_.Remove(this, 89 registrar_.Remove(this,
90 extensions::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT, 90 extensions::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT,
91 content::NotificationService::AllSources()); 91 content::NotificationService::AllSources());
92 STLDeleteElements(&events_); 92 STLDeleteElements(&events_);
93 } 93 }
94 94
95 void ClearEvents() { 95 void ClearEvents() {
96 STLDeleteElements(&events_); 96 STLDeleteElements(&events_);
97 events_.clear();
98 } 97 }
99 98
100 class Event { 99 class Event {
101 public: 100 public:
102 Event(Profile* profile, 101 Event(Profile* profile,
103 const std::string& event_name, 102 const std::string& event_name,
104 const std::string& json_args, 103 const std::string& json_args,
105 base::Time caught) 104 base::Time caught)
106 : profile_(profile), 105 : profile_(profile),
107 event_name_(event_name), 106 event_name_(event_name),
(...skipping 4044 matching lines...) Expand 10 before | Expand all | Expand 10 after
4152 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); 4151 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action);
4153 EXPECT_FALSE(warnings.empty()); 4152 EXPECT_FALSE(warnings.empty());
4154 EXPECT_EQ(Warning::kDownloadFilenameConflict, 4153 EXPECT_EQ(Warning::kDownloadFilenameConflict,
4155 warnings.begin()->warning_type()); 4154 warnings.begin()->warning_type());
4156 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); 4155 EXPECT_EQ("incumbent", warnings.begin()->extension_id());
4157 } 4156 }
4158 4157
4159 } // namespace extensions 4158 } // namespace extensions
4160 4159
4161 #endif // http://crbug.com/3061144 4160 #endif // http://crbug.com/3061144
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698