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

Side by Side Diff: chrome/browser/extensions/extension_browsertest.cc

Issue 2819023: Reworked ExtensionsService::AddPendingExtension(). (Closed)
Patch Set: Fixed browsertest test failure Created 10 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 size_t num_after = service->extensions()->size(); 75 size_t num_after = service->extensions()->size();
76 if (num_after != (num_before + 1)) 76 if (num_after != (num_before + 1))
77 return false; 77 return false;
78 78
79 if (incognito_enabled) { 79 if (incognito_enabled) {
80 // Enable the incognito bit in the extension prefs. The call to 80 // Enable the incognito bit in the extension prefs. The call to
81 // OnExtensionInstalled ensures the other extension prefs are set up with 81 // OnExtensionInstalled ensures the other extension prefs are set up with
82 // the defaults. 82 // the defaults.
83 Extension* extension = service->extensions()->at(num_after - 1); 83 Extension* extension = service->extensions()->at(num_after - 1);
84 service->extension_prefs()->OnExtensionInstalled(extension); 84 service->extension_prefs()->OnExtensionInstalled(
85 extension, Extension::ENABLED, false);
85 service->SetIsIncognitoEnabled(extension, true); 86 service->SetIsIncognitoEnabled(extension, true);
86 } 87 }
87 88
88 return WaitForExtensionHostsToLoad(); 89 return WaitForExtensionHostsToLoad();
89 } 90 }
90 91
91 bool ExtensionBrowserTest::LoadExtension(const FilePath& path) { 92 bool ExtensionBrowserTest::LoadExtension(const FilePath& path) {
92 return LoadExtensionImpl(path, false); 93 return LoadExtensionImpl(path, false);
93 } 94 }
94 95
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 MessageLoopForUI::current()->Quit(); 349 MessageLoopForUI::current()->Quit();
349 } 350 }
350 break; 351 break;
351 } 352 }
352 353
353 default: 354 default:
354 NOTREACHED(); 355 NOTREACHED();
355 break; 356 break;
356 } 357 }
357 } 358 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698