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

Side by Side Diff: content/shell/browser/layout_test/blink_test_controller.cc

Issue 2658473002: Refactor BluetoothAllowedDevicesMap (Closed)
Patch Set: clean up code Created 3 years, 10 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 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 "content/shell/browser/layout_test/blink_test_controller.h" 5 #include "content/shell/browser/layout_test/blink_test_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <iostream> 9 #include <iostream>
10 #include <set> 10 #include <set>
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 main_window_->web_contents()->ExitFullscreen(/*will_cause_resize=*/false); 650 main_window_->web_contents()->ExitFullscreen(/*will_cause_resize=*/false);
651 651
652 ShellBrowserContext* browser_context = 652 ShellBrowserContext* browser_context =
653 ShellContentBrowserClient::Get()->browser_context(); 653 ShellContentBrowserClient::Get()->browser_context();
654 StoragePartition* storage_partition = 654 StoragePartition* storage_partition =
655 BrowserContext::GetStoragePartition(browser_context, nullptr); 655 BrowserContext::GetStoragePartition(browser_context, nullptr);
656 storage_partition->GetServiceWorkerContext()->ClearAllServiceWorkersForTest( 656 storage_partition->GetServiceWorkerContext()->ClearAllServiceWorkersForTest(
657 base::Bind(base::IgnoreResult(&BlinkTestController::Send), 657 base::Bind(base::IgnoreResult(&BlinkTestController::Send),
658 base::Unretained(this), 658 base::Unretained(this),
659 new ShellViewMsg_Reset(render_view_host->GetRoutingID()))); 659 new ShellViewMsg_Reset(render_view_host->GetRoutingID())));
660 storage_partition->ClearBluetoothAllowedDevicesMap();
660 } 661 }
661 662
662 void BlinkTestController::OnImageDump(const std::string& actual_pixel_hash, 663 void BlinkTestController::OnImageDump(const std::string& actual_pixel_hash,
663 const SkBitmap& image) { 664 const SkBitmap& image) {
664 SkAutoLockPixels image_lock(image); 665 SkAutoLockPixels image_lock(image);
665 666
666 printer_->PrintImageHeader(actual_pixel_hash, expected_pixel_hash_); 667 printer_->PrintImageHeader(actual_pixel_hash, expected_pixel_hash_);
667 668
668 // Only encode and dump the png if the hashes don't match. Encoding the 669 // Only encode and dump the png if the hashes don't match. Encoding the
669 // image is really expensive. 670 // image is really expensive.
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 } else { 948 } else {
948 printer_->AddErrorMessage(base::StringPrintf( 949 printer_->AddErrorMessage(base::StringPrintf(
949 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", 950 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.",
950 event_name.c_str())); 951 event_name.c_str()));
951 return; 952 return;
952 } 953 }
953 bluetooth_chooser_factory_->SendEvent(event, argument); 954 bluetooth_chooser_factory_->SendEvent(event, argument);
954 } 955 }
955 956
956 } // namespace content 957 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698