| 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 #include "chrome/browser/extensions/extension_browsertest.h" | 5 #include "chrome/browser/extensions/extension_browsertest.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 install_warnings_message; | 121 install_warnings_message; |
| 122 return NULL; | 122 return NULL; |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 const std::string extension_id = extension->id(); | 126 const std::string extension_id = extension->id(); |
| 127 | 127 |
| 128 // The call to OnExtensionInstalled ensures the other extension prefs | 128 // The call to OnExtensionInstalled ensures the other extension prefs |
| 129 // are set up with the defaults. | 129 // are set up with the defaults. |
| 130 service->extension_prefs()->OnExtensionInstalled( | 130 service->extension_prefs()->OnExtensionInstalled( |
| 131 extension, Extension::ENABLED, false, | 131 extension, Extension::ENABLED, |
| 132 syncer::StringOrdinal::CreateInitialOrdinal()); | 132 syncer::StringOrdinal::CreateInitialOrdinal()); |
| 133 | 133 |
| 134 // Toggling incognito or file access will reload the extension, so wait for | 134 // Toggling incognito or file access will reload the extension, so wait for |
| 135 // the reload and grab the new extension instance. The default state is | 135 // the reload and grab the new extension instance. The default state is |
| 136 // incognito disabled and file access enabled, so we don't wait in those | 136 // incognito disabled and file access enabled, so we don't wait in those |
| 137 // cases. | 137 // cases. |
| 138 { | 138 { |
| 139 content::WindowedNotificationObserver load_signal( | 139 content::WindowedNotificationObserver load_signal( |
| 140 chrome::NOTIFICATION_EXTENSION_LOADED, | 140 chrome::NOTIFICATION_EXTENSION_LOADED, |
| 141 content::Source<Profile>(browser()->profile())); | 141 content::Source<Profile>(browser()->profile())); |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 case content::NOTIFICATION_LOAD_STOP: | 676 case content::NOTIFICATION_LOAD_STOP: |
| 677 VLOG(1) << "Got LOAD_STOP notification."; | 677 VLOG(1) << "Got LOAD_STOP notification."; |
| 678 MessageLoopForUI::current()->Quit(); | 678 MessageLoopForUI::current()->Quit(); |
| 679 break; | 679 break; |
| 680 | 680 |
| 681 default: | 681 default: |
| 682 NOTREACHED(); | 682 NOTREACHED(); |
| 683 break; | 683 break; |
| 684 } | 684 } |
| 685 } | 685 } |
| OLD | NEW |