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

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

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 years, 4 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 : waiting_(false) { 88 : waiting_(false) {
89 registrar_.Add(this, 89 registrar_.Add(this,
90 extensions::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT, 90 extensions::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT,
91 content::NotificationService::AllSources()); 91 content::NotificationService::AllSources());
92 } 92 }
93 93
94 ~DownloadsEventsListener() override { 94 ~DownloadsEventsListener() override {
95 registrar_.Remove(this, 95 registrar_.Remove(this,
96 extensions::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT, 96 extensions::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT,
97 content::NotificationService::AllSources()); 97 content::NotificationService::AllSources());
98 STLDeleteElements(&events_); 98 base::STLDeleteElements(&events_);
99 } 99 }
100 100
101 void ClearEvents() { 101 void ClearEvents() { base::STLDeleteElements(&events_); }
102 STLDeleteElements(&events_);
103 }
104 102
105 class Event { 103 class Event {
106 public: 104 public:
107 Event(Profile* profile, 105 Event(Profile* profile,
108 const std::string& event_name, 106 const std::string& event_name,
109 const std::string& json_args, 107 const std::string& json_args,
110 base::Time caught) 108 base::Time caught)
111 : profile_(profile), 109 : profile_(profile),
112 event_name_(event_name), 110 event_name_(event_name),
113 json_args_(json_args), 111 json_args_(json_args),
(...skipping 4167 matching lines...) Expand 10 before | Expand all | Expand 10 after
4281 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); 4279 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action);
4282 EXPECT_FALSE(warnings.empty()); 4280 EXPECT_FALSE(warnings.empty());
4283 EXPECT_EQ(Warning::kDownloadFilenameConflict, 4281 EXPECT_EQ(Warning::kDownloadFilenameConflict,
4284 warnings.begin()->warning_type()); 4282 warnings.begin()->warning_type());
4285 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); 4283 EXPECT_EQ("incumbent", warnings.begin()->extension_id());
4286 } 4284 }
4287 4285
4288 } // namespace extensions 4286 } // namespace extensions
4289 4287
4290 #endif // http://crbug.com/306144 4288 #endif // http://crbug.com/306144
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698