Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
|
jochen (gone - plz use gerrit)
2011/01/05 12:29:51
2011 plz
pastarmovj
2011/01/05 13:47:38
Done.
| |
| 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_service_unittest.h" | 5 #include "chrome/browser/extensions/extension_service_unittest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 305 virtual ExtensionService* GetExtensionService() { return service_; } | 305 virtual ExtensionService* GetExtensionService() { return service_; } |
| 306 | 306 |
| 307 virtual ChromeAppCacheService* GetAppCacheService() { | 307 virtual ChromeAppCacheService* GetAppCacheService() { |
| 308 if (!appcache_service_) { | 308 if (!appcache_service_) { |
| 309 appcache_service_ = new ChromeAppCacheService; | 309 appcache_service_ = new ChromeAppCacheService; |
| 310 BrowserThread::PostTask( | 310 BrowserThread::PostTask( |
| 311 BrowserThread::IO, FROM_HERE, | 311 BrowserThread::IO, FROM_HERE, |
| 312 NewRunnableMethod(appcache_service_.get(), | 312 NewRunnableMethod(appcache_service_.get(), |
| 313 &ChromeAppCacheService::InitializeOnIOThread, | 313 &ChromeAppCacheService::InitializeOnIOThread, |
| 314 GetPath(), IsOffTheRecord(), | 314 GetPath(), IsOffTheRecord(), |
| 315 make_scoped_refptr(GetHostContentSettingsMap()))); | 315 make_scoped_refptr(GetHostContentSettingsMap()), |
| 316 false)); | |
| 316 } | 317 } |
| 317 return appcache_service_; | 318 return appcache_service_; |
| 318 } | 319 } |
| 319 | 320 |
| 320 virtual fileapi::SandboxedFileSystemContext* GetFileSystemContext() { | 321 virtual fileapi::SandboxedFileSystemContext* GetFileSystemContext() { |
| 321 if (!file_system_context_) | 322 if (!file_system_context_) |
| 322 file_system_context_ = CreateFileSystemContext( | 323 file_system_context_ = CreateFileSystemContext( |
| 323 GetPath(), IsOffTheRecord()); | 324 GetPath(), IsOffTheRecord()); |
| 324 return file_system_context_; | 325 return file_system_context_; |
| 325 } | 326 } |
| (...skipping 2929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3255 // Component extensions shouldn't get recourded in the prefs. | 3256 // Component extensions shouldn't get recourded in the prefs. |
| 3256 ValidatePrefKeyCount(0); | 3257 ValidatePrefKeyCount(0); |
| 3257 | 3258 |
| 3258 // Reload all extensions, and make sure it comes back. | 3259 // Reload all extensions, and make sure it comes back. |
| 3259 std::string extension_id = service_->extensions()->at(0)->id(); | 3260 std::string extension_id = service_->extensions()->at(0)->id(); |
| 3260 loaded_.clear(); | 3261 loaded_.clear(); |
| 3261 service_->ReloadExtensions(); | 3262 service_->ReloadExtensions(); |
| 3262 ASSERT_EQ(1u, service_->extensions()->size()); | 3263 ASSERT_EQ(1u, service_->extensions()->size()); |
| 3263 EXPECT_EQ(extension_id, service_->extensions()->at(0)->id()); | 3264 EXPECT_EQ(extension_id, service_->extensions()->at(0)->id()); |
| 3264 } | 3265 } |
| OLD | NEW |