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

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

Issue 226023003: Create CrxInstaller directly in WebstoreInstaller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android compilation fix (again). Created 6 years, 8 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
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 ExtensionService* extension_service = 467 ExtensionService* extension_service =
468 browser()->profile()->GetExtensionService(); 468 browser()->profile()->GetExtensionService();
469 469
470 extensions::CrxInstaller* crx_installer = NULL; 470 extensions::CrxInstaller* crx_installer = NULL;
471 471
472 // Create an observer to wait for the update to finish. 472 // Create an observer to wait for the update to finish.
473 content::WindowedNotificationObserver windowed_observer( 473 content::WindowedNotificationObserver windowed_observer(
474 chrome::NOTIFICATION_CRX_INSTALLER_DONE, 474 chrome::NOTIFICATION_CRX_INSTALLER_DONE,
475 content::Source<extensions::CrxInstaller>(crx_installer)); 475 content::Source<extensions::CrxInstaller>(crx_installer));
476 ASSERT_TRUE(extension_service-> 476 ASSERT_TRUE(extension_service->
477 UpdateExtension(extension->id(), path_v2_, true, GURL(), &crx_installer)); 477 UpdateExtension(extension->id(), path_v2_, true, &crx_installer));
478 windowed_observer.Wait(); 478 windowed_observer.Wait();
479 479
480 extension = extension_service->GetExtensionById( 480 extension = extension_service->GetExtensionById(
481 extension_infos[0].id, false); // don't include disabled extensions. 481 extension_infos[0].id, false); // don't include disabled extensions.
482 482
483 // The total series of events for this process will be: 483 // The total series of events for this process will be:
484 // Extension Install - install version 1 484 // Extension Install - install version 1
485 // Extension Install - install version 2 485 // Extension Install - install version 2
486 // Extension Update - signal the udate to version 2 486 // Extension Update - signal the udate to version 2
487 // We push back the corresponding ExtensionBasicInfos. 487 // We push back the corresponding ExtensionBasicInfos.
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 test_server()->GetURL(std::string("files/").append("title2.html"))); 788 test_server()->GetURL(std::string("files/").append("title2.html")));
789 789
790 GatherStatistics(); 790 GatherStatistics();
791 791
792 metrics = GetStats(METRIC_NETWORK_BYTES_READ); 792 metrics = GetStats(METRIC_NETWORK_BYTES_READ);
793 ASSERT_EQ(2u, metrics.size()); 793 ASSERT_EQ(2u, metrics.size());
794 EXPECT_GE(metrics[1].value, page1_size + page2_size); 794 EXPECT_GE(metrics[1].value, page1_size + page2_size);
795 } 795 }
796 796
797 } // namespace performance_monitor 797 } // namespace performance_monitor
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698