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

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

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, merge to LKGR. Created 7 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 | 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/device_status_collector.h" 5 #include "chrome/browser/policy/device_status_collector.h"
6 6
7 #include "base/environment.h" 7 #include "base/environment.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/prefs/pref_service.h"
11 #include "base/threading/sequenced_worker_pool.h" 12 #include "base/threading/sequenced_worker_pool.h"
12 #include "chrome/browser/chromeos/settings/cros_settings.h" 13 #include "chrome/browser/chromeos/settings/cros_settings.h"
13 #include "chrome/browser/chromeos/settings/cros_settings_names.h" 14 #include "chrome/browser/chromeos/settings/cros_settings_names.h"
14 #include "chrome/browser/chromeos/settings/cros_settings_provider.h" 15 #include "chrome/browser/chromeos/settings/cros_settings_provider.h"
15 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" 16 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h"
16 #include "chrome/browser/chromeos/system/mock_statistics_provider.h" 17 #include "chrome/browser/chromeos/system/mock_statistics_provider.h"
17 #include "chrome/browser/chromeos/system/statistics_provider.h" 18 #include "chrome/browser/chromeos/system/statistics_provider.h"
18 #include "chrome/browser/policy/proto/device_management_backend.pb.h" 19 #include "chrome/browser/policy/proto/device_management_backend.pb.h"
19 #include "chrome/browser/prefs/pref_service.h"
20 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
21 #include "chrome/test/base/testing_pref_service.h" 21 #include "chrome/test/base/testing_pref_service.h"
22 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
23 #include "content/public/test/test_browser_thread.h" 23 #include "content/public/test/test_browser_thread.h"
24 #include "testing/gmock/include/gmock/gmock.h" 24 #include "testing/gmock/include/gmock/gmock.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 using ::testing::DoAll; 27 using ::testing::DoAll;
28 using ::testing::NotNull; 28 using ::testing::NotNull;
29 using ::testing::Return; 29 using ::testing::Return;
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 // Check that after enabling location reporting again, an error is reported 564 // Check that after enabling location reporting again, an error is reported
565 // if no valid fix is available. 565 // if no valid fix is available.
566 SetMockPositionToReturnNext(invalid_fix); 566 SetMockPositionToReturnNext(invalid_fix);
567 cros_settings_->SetBoolean(chromeos::kReportDeviceLocation, true); 567 cros_settings_->SetBoolean(chromeos::kReportDeviceLocation, true);
568 // Allow the new pref to propagate to the status collector. 568 // Allow the new pref to propagate to the status collector.
569 message_loop_.RunUntilIdle(); 569 message_loop_.RunUntilIdle();
570 CheckThatALocationErrorIsReported(); 570 CheckThatALocationErrorIsReported();
571 } 571 }
572 572
573 } // namespace policy 573 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_status_collector.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698