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

Side by Side Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 11271024: Fix DeviceStatusCollectorTest.MaxStoredPeriods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Using a fixed time, rebased Created 8 years, 1 month 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 "chrome/browser/policy/browser_policy_connector.h" 5 #include "chrome/browser/policy/browser_policy_connector.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 device_data_store_->set_machine_model( 568 device_data_store_->set_machine_model(
569 DeviceCloudPolicyManagerChromeOS::GetMachineModel()); 569 DeviceCloudPolicyManagerChromeOS::GetMachineModel());
570 } 570 }
571 571
572 device_cloud_policy_subsystem_->CompleteInitialization( 572 device_cloud_policy_subsystem_->CompleteInitialization(
573 prefs::kDevicePolicyRefreshRate, 573 prefs::kDevicePolicyRefreshRate,
574 kServiceInitializationStartupDelay); 574 kServiceInitializationStartupDelay);
575 } 575 }
576 576
577 if (device_data_store_.get()) { 577 if (device_data_store_.get()) {
578 device_data_store_->set_device_status_collector( 578 DeviceStatusCollector* collector =
579 new DeviceStatusCollector( 579 new DeviceStatusCollector(
580 g_browser_process->local_state(), 580 g_browser_process->local_state(),
581 chromeos::system::StatisticsProvider::GetInstance(), 581 chromeos::system::StatisticsProvider::GetInstance(),
582 NULL)); 582 NULL);
583 collector->Init();
584 device_data_store_->set_device_status_collector(collector);
583 } 585 }
584 586
585 if (device_cloud_policy_manager_.get()) { 587 if (device_cloud_policy_manager_.get()) {
586 device_cloud_policy_manager_->Init(); 588 device_cloud_policy_manager_->Init();
587 device_cloud_policy_manager_->Connect( 589 device_cloud_policy_manager_->Connect(
588 g_browser_process->local_state(), 590 g_browser_process->local_state(),
589 device_management_service_.get()); 591 device_management_service_.get());
590 } 592 }
591 593
592 SetTimezoneIfPolicyAvailable(); 594 SetTimezoneIfPolicyAvailable();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 return new AsyncPolicyProvider(loader.Pass()); 668 return new AsyncPolicyProvider(loader.Pass());
667 } else { 669 } else {
668 return NULL; 670 return NULL;
669 } 671 }
670 #else 672 #else
671 return NULL; 673 return NULL;
672 #endif 674 #endif
673 } 675 }
674 676
675 } // namespace policy 677 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698