OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ui/toolbar/recent_tabs_sub_menu_model.h" | 5 #include "chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
11 #include "chrome/browser/favicon/favicon_service_factory.h" | 11 #include "chrome/browser/favicon/favicon_service_factory.h" |
12 #include "chrome/browser/favicon/favicon_types.h" | 12 #include "chrome/browser/favicon/favicon_types.h" |
13 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 13 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/sessions/session_restore.h" | 15 #include "chrome/browser/sessions/session_restore.h" |
16 #include "chrome/browser/sessions/tab_restore_service.h" | 16 #include "chrome/browser/sessions/tab_restore_service.h" |
17 #include "chrome/browser/sessions/tab_restore_service_delegate.h" | 17 #include "chrome/browser/sessions/tab_restore_service_delegate.h" |
18 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 18 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
19 #include "chrome/browser/sync/glue/session_model_associator.h" | 19 #include "chrome/browser/sync/glue/session_model_associator.h" |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 RecentTabsSubMenuModel::GetModelAssociator() { | 520 RecentTabsSubMenuModel::GetModelAssociator() { |
521 if (!associator_) { | 521 if (!associator_) { |
522 ProfileSyncService* service = ProfileSyncServiceFactory::GetInstance()-> | 522 ProfileSyncService* service = ProfileSyncServiceFactory::GetInstance()-> |
523 GetForProfile(browser_->profile()); | 523 GetForProfile(browser_->profile()); |
524 // Only return the associator if it exists and it is done syncing sessions. | 524 // Only return the associator if it exists and it is done syncing sessions. |
525 if (service && service->ShouldPushChanges()) | 525 if (service && service->ShouldPushChanges()) |
526 associator_ = service->GetSessionModelAssociator(); | 526 associator_ = service->GetSessionModelAssociator(); |
527 } | 527 } |
528 return associator_; | 528 return associator_; |
529 } | 529 } |
OLD | NEW |