OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |