OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chromeos/extensions/external_cache.h" | 5 #include "chrome/browser/chromeos/extensions/external_cache.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 return request_context_getter_.get(); | 55 return request_context_getter_.get(); |
56 } | 56 } |
57 | 57 |
58 const base::DictionaryValue* provided_prefs() { | 58 const base::DictionaryValue* provided_prefs() { |
59 return prefs_.get(); | 59 return prefs_.get(); |
60 } | 60 } |
61 | 61 |
62 // testing::Test overrides: | 62 // testing::Test overrides: |
63 void SetUp() override { | 63 void SetUp() override { |
64 request_context_getter_ = new net::TestURLRequestContextGetter( | 64 request_context_getter_ = new net::TestURLRequestContextGetter( |
65 content::BrowserThread::GetMessageLoopProxyForThread( | 65 content::BrowserThread::GetTaskRunnerForThread( |
66 content::BrowserThread::IO)); | 66 content::BrowserThread::IO)); |
67 fetcher_factory_.reset(new net::TestURLFetcherFactory()); | 67 fetcher_factory_.reset(new net::TestURLFetcherFactory()); |
68 | 68 |
69 pool_owner_.reset( | 69 pool_owner_.reset( |
70 new base::SequencedWorkerPoolOwner(3, "Background Pool")); | 70 new base::SequencedWorkerPoolOwner(3, "Background Pool")); |
71 background_task_runner_ = pool_owner_->pool()->GetSequencedTaskRunner( | 71 background_task_runner_ = pool_owner_->pool()->GetSequencedTaskRunner( |
72 pool_owner_->pool()->GetNamedSequenceToken("background")); | 72 pool_owner_->pool()->GetNamedSequenceToken("background")); |
73 } | 73 } |
74 | 74 |
75 // ExternalCache::Delegate: | 75 // ExternalCache::Delegate: |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 ASSERT_TRUE(provided_prefs()->GetDictionary(kTestExtensionId1, &entry1)); | 301 ASSERT_TRUE(provided_prefs()->GetDictionary(kTestExtensionId1, &entry1)); |
302 EXPECT_TRUE(entry1->HasKey( | 302 EXPECT_TRUE(entry1->HasKey( |
303 extensions::ExternalProviderImpl::kExternalUpdateUrl)); | 303 extensions::ExternalProviderImpl::kExternalUpdateUrl)); |
304 EXPECT_FALSE(entry1->HasKey( | 304 EXPECT_FALSE(entry1->HasKey( |
305 extensions::ExternalProviderImpl::kExternalCrx)); | 305 extensions::ExternalProviderImpl::kExternalCrx)); |
306 EXPECT_FALSE(entry1->HasKey( | 306 EXPECT_FALSE(entry1->HasKey( |
307 extensions::ExternalProviderImpl::kExternalVersion)); | 307 extensions::ExternalProviderImpl::kExternalVersion)); |
308 } | 308 } |
309 | 309 |
310 } // namespace chromeos | 310 } // namespace chromeos |
OLD | NEW |