Lines Matching defs:service_
81 service_.reset(new PersistentTabRestoreService(profile(), time_factory_));
85 service_->Shutdown();
86 service_.reset();
92 return service_->mutable_entries();
96 service_->PruneEntries();
116 service_->Shutdown();
118 service_.reset();
119 service_.reset(new PersistentTabRestoreService(profile(), time_factory_));
160 service_->LoadTabsFromLastSession();
170 scoped_ptr<PersistentTabRestoreService> service_;
205 service_->CreateHistoricalTab(web_contents(), -1);
208 ASSERT_EQ(1U, service_->entries().size());
211 TabRestoreService::Entry* entry = service_->entries().front();
229 service_->CreateHistoricalTab(web_contents(), -1);
232 ASSERT_EQ(2U, service_->entries().size());
235 entry = service_->entries().front();
252 service_->CreateHistoricalTab(web_contents(), -1);
253 EXPECT_TRUE(service_->entries().empty());
261 service_->CreateHistoricalTab(web_contents(), -1);
267 ASSERT_EQ(1U, service_->entries().size());
270 PersistentTabRestoreService::Entry* entry = service_->entries().front();
288 service_->CreateHistoricalTab(web_contents(), -1);
291 ASSERT_EQ(1U, service_->entries().size());
295 TabRestoreService::Entry* entry = service_->entries().front();
306 ASSERT_EQ(1U, service_->entries().size());
309 entry = service_->entries().front();
329 service_->CreateHistoricalTab(web_contents(), -1);
330 ASSERT_EQ(1U, service_->entries().size());
336 ASSERT_EQ(1U, service_->entries().size());
338 const TabRestoreService::Entry* restored_entry = service_->entries().front();
356 service_->CreateHistoricalTab(web_contents(), -1);
357 ASSERT_EQ(1U, service_->entries().size());
365 ASSERT_EQ(1U, service_->entries().size());
375 EXPECT_FALSE(service_->IsLoaded());
378 service_->AddObserver(&observer);
381 service_->RemoveObserver(&observer);
384 ASSERT_EQ(1U, service_->entries().size());
385 TabRestoreService::Entry* entry2 = service_->entries().front();
411 ASSERT_EQ(0U, service_->entries().size());
425 ASSERT_EQ(0U, service_->entries().size());
436 service_->CreateHistoricalTab(web_contents(), -1);
442 ASSERT_EQ(2U, service_->entries().size());
444 TabRestoreService::Entry* entry = service_->entries().front();
457 entry = *(++service_->entries().begin());
479 service_->CreateHistoricalTab(web_contents(), -1);
485 ASSERT_EQ(2U, service_->entries().size());
487 TabRestoreService::Entry* entry = service_->entries().front();
499 entry = *(++service_->entries().begin());
523 service_->CreateHistoricalTab(web_contents(), -1);
529 ASSERT_EQ(kMaxEntries, service_->entries().size());
532 TabRestoreService::Entry* entry = service_->entries().front();
552 service_->CreateHistoricalTab(web_contents(), -1);
555 ASSERT_EQ(1U, service_->entries().size());
561 TabRestoreService::Entry* entry = service_->entries().front();
579 ASSERT_EQ(1U, service_->entries().size());
582 TabRestoreService::Entry* restored_entry = service_->entries().front();
600 service_->CreateHistoricalTab(web_contents(), -1);
603 ASSERT_EQ(1U, service_->entries().size());
609 TabRestoreService::Entry* entry = service_->entries().front();
626 ASSERT_EQ(1U, service_->entries().size());
629 TabRestoreService::Entry* restored_entry = service_->entries().front();
640 service_->ClearEntries();
641 ASSERT_TRUE(service_->entries().empty());
658 EXPECT_EQ(max_entries + 5, service_->entries().size());
660 EXPECT_EQ(max_entries, service_->entries().size());
663 EXPECT_EQ(max_entries, service_->entries().size());
674 EXPECT_EQ(max_entries + 1, service_->entries().size());
676 EXPECT_EQ(max_entries, service_->entries().size());
678 static_cast<Tab*>(service_->entries().front())->
690 EXPECT_EQ(max_entries + 1, service_->entries().size());
692 EXPECT_EQ(max_entries, service_->entries().size());
694 static_cast<Tab*>(service_->entries().front())->
703 EXPECT_EQ(max_entries + 1, service_->entries().size());
705 EXPECT_EQ(max_entries, service_->entries().size());
707 static_cast<Tab*>(service_->entries().front())->
712 delete service_->entries().front();
719 EXPECT_EQ(max_entries, service_->entries().size());
721 EXPECT_EQ(max_entries, service_->entries().size());
723 static_cast<Tab*>(service_->entries().front())->
740 service_->CreateHistoricalTab(web_contents(), -1);
743 EXPECT_EQ(max_entries, service_->entries().size());
746 EXPECT_EQ(max_entries, service_->entries().size());
756 service_->CreateHistoricalTab(web_contents(), -1);
759 EXPECT_FALSE(service_->IsLoaded());
761 service_->AddObserver(&observer);
762 EXPECT_EQ(max_entries, service_->entries().size());
765 EXPECT_TRUE(service_->IsLoaded());
766 service_->RemoveObserver(&observer);