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

Side by Side Diff: components/visitedlink/test/visitedlink_unittest.cc

Issue 1154283003: Change most uses of Pickle to base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
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 <cstdio> 5 #include <cstdio>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 void WidgetRestored() override { widgets_++; } 542 void WidgetRestored() override { widgets_++; }
543 void WidgetHidden() override { widgets_--; } 543 void WidgetHidden() override { widgets_--; }
544 int VisibleWidgetCount() const override { return widgets_; } 544 int VisibleWidgetCount() const override { return widgets_; }
545 545
546 bool Send(IPC::Message* msg) override { 546 bool Send(IPC::Message* msg) override {
547 VisitCountingContext* counting_context = 547 VisitCountingContext* counting_context =
548 static_cast<VisitCountingContext*>( 548 static_cast<VisitCountingContext*>(
549 GetBrowserContext()); 549 GetBrowserContext());
550 550
551 if (msg->type() == ChromeViewMsg_VisitedLink_Add::ID) { 551 if (msg->type() == ChromeViewMsg_VisitedLink_Add::ID) {
552 PickleIterator iter(*msg); 552 base::PickleIterator iter(*msg);
553 std::vector<uint64> fingerprints; 553 std::vector<uint64> fingerprints;
554 CHECK(IPC::ReadParam(msg, &iter, &fingerprints)); 554 CHECK(IPC::ReadParam(msg, &iter, &fingerprints));
555 counting_context->CountAddEvent(fingerprints.size()); 555 counting_context->CountAddEvent(fingerprints.size());
556 } else if (msg->type() == ChromeViewMsg_VisitedLink_Reset::ID) { 556 } else if (msg->type() == ChromeViewMsg_VisitedLink_Reset::ID) {
557 counting_context->CountResetEvent(); 557 counting_context->CountResetEvent();
558 } else if (msg->type() == ChromeViewMsg_VisitedLink_NewTable::ID) { 558 } else if (msg->type() == ChromeViewMsg_VisitedLink_NewTable::ID) {
559 counting_context->CountNewTable(); 559 counting_context->CountNewTable();
560 } 560 }
561 561
562 delete msg; 562 delete msg;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 content::NotificationService::current()->Notify( 757 content::NotificationService::current()->Notify(
758 content::NOTIFICATION_RENDERER_PROCESS_CREATED, 758 content::NOTIFICATION_RENDERER_PROCESS_CREATED,
759 content::Source<content::RenderProcessHost>(&different_process_host), 759 content::Source<content::RenderProcessHost>(&different_process_host),
760 content::NotificationService::NoDetails()); 760 content::NotificationService::NoDetails());
761 WaitForCoalescense(); 761 WaitForCoalescense();
762 762
763 EXPECT_EQ(0, different_context.new_table_count()); 763 EXPECT_EQ(0, different_context.new_table_count());
764 } 764 }
765 765
766 } // namespace visitedlink 766 } // namespace visitedlink
OLDNEW
« no previous file with comments | « components/sessions/session_service_commands.cc ('k') | content/browser/android/java/gin_java_bridge_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698