| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 service()->SetWindowType( | 64 service()->SetWindowType( |
| 65 window_id, Browser::TYPE_TABBED, SessionService::TYPE_NORMAL); | 65 window_id, Browser::TYPE_TABBED, SessionService::TYPE_NORMAL); |
| 66 service()->SetWindowBounds(window_id, | 66 service()->SetWindowBounds(window_id, |
| 67 window_bounds, | 67 window_bounds, |
| 68 ui::SHOW_STATE_NORMAL); | 68 ui::SHOW_STATE_NORMAL); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // Upon notification, increment the sync_save_count variable | 71 // Upon notification, increment the sync_save_count variable |
| 72 virtual void Observe(int type, | 72 virtual void Observe(int type, |
| 73 const content::NotificationSource& source, | 73 const content::NotificationSource& source, |
| 74 const content::NotificationDetails& details) OVERRIDE { | 74 const content::NotificationDetails& details) override { |
| 75 ASSERT_EQ(type, chrome::NOTIFICATION_SESSION_SERVICE_SAVED); | 75 ASSERT_EQ(type, chrome::NOTIFICATION_SESSION_SERVICE_SAVED); |
| 76 sync_save_count_++; | 76 sync_save_count_++; |
| 77 } | 77 } |
| 78 | 78 |
| 79 virtual void TearDown() { | 79 virtual void TearDown() { |
| 80 helper_.SetService(NULL); | 80 helper_.SetService(NULL); |
| 81 BrowserWithTestWindowTest::TearDown(); | 81 BrowserWithTestWindowTest::TearDown(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void UpdateNavigation( | 84 void UpdateNavigation( |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 &cancelable_task_tracker); | 1041 &cancelable_task_tracker); |
| 1042 helper_.RunTaskOnBackendThread( | 1042 helper_.RunTaskOnBackendThread( |
| 1043 FROM_HERE, | 1043 FROM_HERE, |
| 1044 base::Bind(&PostBackToThread, | 1044 base::Bind(&PostBackToThread, |
| 1045 base::Unretained(base::MessageLoop::current()), | 1045 base::Unretained(base::MessageLoop::current()), |
| 1046 base::Unretained(&run_loop))); | 1046 base::Unretained(&run_loop))); |
| 1047 delete helper_.ReleaseService(); | 1047 delete helper_.ReleaseService(); |
| 1048 event.Signal(); | 1048 event.Signal(); |
| 1049 run_loop.Run(); | 1049 run_loop.Run(); |
| 1050 } | 1050 } |
| OLD | NEW |