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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 extensions::PermissionsUpdater(service->profile()).RemovePermissions( | 157 extensions::PermissionsUpdater(service->profile()).RemovePermissions( |
158 extension, extension->permissions_data()->active_permissions().get()); | 158 extension, extension->permissions_data()->active_permissions().get()); |
159 } | 159 } |
160 | 160 |
161 void AddEphemeralApp(const Extension* extension, ExtensionService* service) { | 161 void AddEphemeralApp(const Extension* extension, ExtensionService* service) { |
162 extensions::ExtensionPrefs* prefs = | 162 extensions::ExtensionPrefs* prefs = |
163 extensions::ExtensionPrefs::Get(service->profile()); | 163 extensions::ExtensionPrefs::Get(service->profile()); |
164 ASSERT_TRUE(prefs); | 164 ASSERT_TRUE(prefs); |
165 prefs->OnExtensionInstalled(extension, | 165 prefs->OnExtensionInstalled(extension, |
166 extensions::Extension::ENABLED, | 166 extensions::Extension::ENABLED, |
| 167 extensions::Extension::DISABLE_NONE, |
167 syncer::StringOrdinal(), | 168 syncer::StringOrdinal(), |
168 extensions::kInstallFlagIsEphemeral, | 169 extensions::kInstallFlagIsEphemeral, |
169 std::string()); | 170 std::string()); |
170 | 171 |
171 service->AddExtension(extension); | 172 service->AddExtension(extension); |
172 } | 173 } |
173 | 174 |
174 } // namespace | 175 } // namespace |
175 | 176 |
176 // Crashes on Mac tryslaves. | 177 // Crashes on Mac tryslaves. |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 break; | 584 break; |
584 case 2: | 585 case 2: |
585 TogglePermission(service, &extensions, model.get(), &expected, &count); | 586 TogglePermission(service, &extensions, model.get(), &expected, &count); |
586 break; | 587 break; |
587 default: | 588 default: |
588 NOTREACHED(); | 589 NOTREACHED(); |
589 break; | 590 break; |
590 } | 591 } |
591 } | 592 } |
592 } | 593 } |
OLD | NEW |