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

Side by Side Diff: chrome/browser/performance_monitor/performance_monitor_browsertest.cc

Issue 425303002: Move extension notifications to extensions/browser/notification_types.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (extension-notifications) rebase Created 6 years, 4 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 | Annotate | Revision Log
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 std::vector<ExtensionBasicInfo> extension_infos; 501 std::vector<ExtensionBasicInfo> extension_infos;
502 extension_infos.push_back(ExtensionBasicInfo(extension)); 502 extension_infos.push_back(ExtensionBasicInfo(extension));
503 503
504 ExtensionService* extension_service = extensions::ExtensionSystem::Get( 504 ExtensionService* extension_service = extensions::ExtensionSystem::Get(
505 browser()->profile())->extension_service(); 505 browser()->profile())->extension_service();
506 506
507 extensions::CrxInstaller* crx_installer = NULL; 507 extensions::CrxInstaller* crx_installer = NULL;
508 508
509 // Create an observer to wait for the update to finish. 509 // Create an observer to wait for the update to finish.
510 content::WindowedNotificationObserver windowed_observer( 510 content::WindowedNotificationObserver windowed_observer(
511 chrome::NOTIFICATION_CRX_INSTALLER_DONE, 511 extensions::NOTIFICATION_CRX_INSTALLER_DONE,
512 content::Source<extensions::CrxInstaller>(crx_installer)); 512 content::Source<extensions::CrxInstaller>(crx_installer));
513 ASSERT_TRUE(extension_service->UpdateExtension( 513 ASSERT_TRUE(extension_service->UpdateExtension(
514 extension->id(), path_v2_, true, &crx_installer)); 514 extension->id(), path_v2_, true, &crx_installer));
515 windowed_observer.Wait(); 515 windowed_observer.Wait();
516 516
517 extension = extensions::ExtensionRegistry::Get( 517 extension = extensions::ExtensionRegistry::Get(
518 browser()->profile())->enabled_extensions().GetByID( 518 browser()->profile())->enabled_extensions().GetByID(
519 extension_infos[0].id); 519 extension_infos[0].id);
520 520
521 // The total series of events for this process will be: 521 // The total series of events for this process will be:
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 metrics = GetStats(METRIC_NETWORK_BYTES_READ); 834 metrics = GetStats(METRIC_NETWORK_BYTES_READ);
835 ASSERT_EQ(2u, metrics.size()); 835 ASSERT_EQ(2u, metrics.size());
836 EXPECT_GE(metrics[1].value, page1_size + page2_size); 836 EXPECT_GE(metrics[1].value, page1_size + page2_size);
837 } 837 }
838 838
839 INSTANTIATE_TEST_CASE_P(PerformanceMonitorUncleanExitBrowserTestInstantiation, 839 INSTANTIATE_TEST_CASE_P(PerformanceMonitorUncleanExitBrowserTestInstantiation,
840 PerformanceMonitorUncleanExitBrowserTest, 840 PerformanceMonitorUncleanExitBrowserTest,
841 testing::Bool()); 841 testing::Bool());
842 842
843 } // namespace performance_monitor 843 } // namespace performance_monitor
OLDNEW
« no previous file with comments | « chrome/browser/performance_monitor/performance_monitor.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698