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 // TODO(rickcam): Bug 73183: Add unit tests for image loading | 5 // TODO(rickcam): Bug 73183: Add unit tests for image loading |
6 | 6 |
7 #include <cstdlib> | 7 #include <cstdlib> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "chrome/browser/background/background_application_list_model.h" | 10 #include "chrome/browser/background/background_application_list_model.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 extensions::PermissionsUpdater(service->profile()).AddPermissions( | 105 extensions::PermissionsUpdater(service->profile()).AddPermissions( |
106 extension, permissions.get()); | 106 extension, permissions.get()); |
107 } | 107 } |
108 | 108 |
109 void RemoveBackgroundPermission(ExtensionService* service, | 109 void RemoveBackgroundPermission(ExtensionService* service, |
110 Extension* extension) { | 110 Extension* extension) { |
111 if (!BackgroundApplicationListModel::IsBackgroundApp(*extension, | 111 if (!BackgroundApplicationListModel::IsBackgroundApp(*extension, |
112 service->profile())) { | 112 service->profile())) { |
113 return; | 113 return; |
114 } | 114 } |
115 extensions::PermissionsUpdater(service->profile()).RemovePermissions( | 115 extensions::PermissionsUpdater(service->profile()) |
116 extension, extension->GetActivePermissions()); | 116 .RemovePermissions(extension, extension->GetActivePermissions().get()); |
117 } | 117 } |
118 } // namespace | 118 } // namespace |
119 | 119 |
120 // Crashes on Mac tryslaves. | 120 // Crashes on Mac tryslaves. |
121 // http://crbug.com/165458 | 121 // http://crbug.com/165458 |
122 #if defined(OS_MACOSX) || defined(OS_LINUX) | 122 #if defined(OS_MACOSX) || defined(OS_LINUX) |
123 #define MAYBE_ExplicitTest DISABLED_ExplicitTest | 123 #define MAYBE_ExplicitTest DISABLED_ExplicitTest |
124 #else | 124 #else |
125 #define MAYBE_ExplicitTest ExplicitTest | 125 #define MAYBE_ExplicitTest ExplicitTest |
126 #endif | 126 #endif |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 break; | 370 break; |
371 case 2: | 371 case 2: |
372 TogglePermission(service, &extensions, model.get(), &expected, &count); | 372 TogglePermission(service, &extensions, model.get(), &expected, &count); |
373 break; | 373 break; |
374 default: | 374 default: |
375 NOTREACHED(); | 375 NOTREACHED(); |
376 break; | 376 break; |
377 } | 377 } |
378 } | 378 } |
379 } | 379 } |
OLD | NEW |