| OLD | NEW | 
|---|
| 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/basictypes.h" | 5 #include "base/basictypes.h" | 
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" | 
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" | 
|  | 8 #include "base/location.h" | 
| 8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" | 
| 9 #include "base/run_loop.h" | 10 #include "base/run_loop.h" | 
|  | 11 #include "base/single_thread_task_runner.h" | 
| 10 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" | 
| 11 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" | 
|  | 14 #include "base/thread_task_runner_handle.h" | 
| 12 #include "base/values.h" | 15 #include "base/values.h" | 
| 13 #include "chrome/browser/invalidation/fake_invalidation_service.h" | 16 #include "chrome/browser/invalidation/fake_invalidation_service.h" | 
| 14 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" | 17 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" | 
| 15 #include "chrome/browser/signin/account_tracker_service_factory.h" | 18 #include "chrome/browser/signin/account_tracker_service_factory.h" | 
| 16 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" | 19 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" | 
| 17 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" | 20 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" | 
| 18 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 21 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 
| 19 #include "chrome/browser/signin/signin_manager_factory.h" | 22 #include "chrome/browser/signin/signin_manager_factory.h" | 
| 20 #include "chrome/browser/sync/glue/sync_backend_host_mock.h" | 23 #include "chrome/browser/sync/glue/sync_backend_host_mock.h" | 
| 21 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" | 24 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" | 
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 301                                  Profile* profile, | 304                                  Profile* profile, | 
| 302                                  base::Time start, | 305                                  base::Time start, | 
| 303                                  base::Time end) { | 306                                  base::Time end) { | 
| 304     EXPECT_EQ(profile_, profile); | 307     EXPECT_EQ(profile_, profile); | 
| 305     clear_browsing_date_start_ = start; | 308     clear_browsing_date_start_ = start; | 
| 306   } | 309   } | 
| 307 | 310 | 
| 308  protected: | 311  protected: | 
| 309   void PumpLoop() { | 312   void PumpLoop() { | 
| 310     base::RunLoop run_loop; | 313     base::RunLoop run_loop; | 
| 311     base::MessageLoop::current()->PostTask( | 314     base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, | 
| 312         FROM_HERE, run_loop.QuitClosure()); | 315                                                   run_loop.QuitClosure()); | 
| 313     run_loop.Run(); | 316     run_loop.Run(); | 
| 314   } | 317   } | 
| 315 | 318 | 
| 316   // The requested start time when ClearBrowsingDataCallback is called. | 319   // The requested start time when ClearBrowsingDataCallback is called. | 
| 317   base::Time clear_browsing_date_start_; | 320   base::Time clear_browsing_date_start_; | 
| 318 | 321 | 
| 319  private: | 322  private: | 
| 320   content::TestBrowserThreadBundle thread_bundle_; | 323   content::TestBrowserThreadBundle thread_bundle_; | 
| 321   TestingProfileManager profile_manager_; | 324   TestingProfileManager profile_manager_; | 
| 322   TestingProfile* profile_; | 325   TestingProfile* profile_; | 
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 697 | 700 | 
| 698   // Verify memory pressure and shutdown recorded. | 701   // Verify memory pressure and shutdown recorded. | 
| 699   EXPECT_EQ(profile()->GetPrefs()->GetInteger( | 702   EXPECT_EQ(profile()->GetPrefs()->GetInteger( | 
| 700                 sync_driver::prefs::kSyncMemoryPressureWarningCount), | 703                 sync_driver::prefs::kSyncMemoryPressureWarningCount), | 
| 701             2); | 704             2); | 
| 702   EXPECT_TRUE(sync_prefs.DidSyncShutdownCleanly()); | 705   EXPECT_TRUE(sync_prefs.DidSyncShutdownCleanly()); | 
| 703 } | 706 } | 
| 704 | 707 | 
| 705 }  // namespace | 708 }  // namespace | 
| 706 }  // namespace browser_sync | 709 }  // namespace browser_sync | 
| OLD | NEW | 
|---|