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

Side by Side Diff: chrome/browser/background/background_application_list_model_unittest.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
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 // 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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698