Chromium Code Reviews| 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 "chrome/browser/sessions/tab_restore_service_factory.h" | 5 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 6 | 6 |
| 7 #include <utility> | |
| 8 | |
| 7 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/sessions/chrome_tab_restore_service_client.h" | 11 #include "chrome/browser/sessions/chrome_tab_restore_service_client.h" |
| 10 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 12 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 11 | 13 |
| 12 #if defined(OS_ANDROID) | 14 #if defined(OS_ANDROID) |
| 13 #include "components/sessions/core/in_memory_tab_restore_service.h" | 15 #include "components/sessions/core/in_memory_tab_restore_service.h" |
| 14 #else | 16 #else |
| 15 #include "components/sessions/core/persistent_tab_restore_service.h" | 17 #include "components/sessions/core/persistent_tab_restore_service.h" |
| 16 #endif | 18 #endif |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 } | 55 } |
| 54 | 56 |
| 55 KeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( | 57 KeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( |
| 56 content::BrowserContext* browser_context) const { | 58 content::BrowserContext* browser_context) const { |
| 57 Profile* profile = Profile::FromBrowserContext(browser_context); | 59 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 58 DCHECK(!profile->IsOffTheRecord()); | 60 DCHECK(!profile->IsOffTheRecord()); |
| 59 scoped_ptr<sessions::TabRestoreServiceClient> client( | 61 scoped_ptr<sessions::TabRestoreServiceClient> client( |
| 60 new ChromeTabRestoreServiceClient(profile)); | 62 new ChromeTabRestoreServiceClient(profile)); |
| 61 | 63 |
| 62 #if defined(OS_ANDROID) | 64 #if defined(OS_ANDROID) |
| 63 return new sessions::InMemoryTabRestoreService(client.Pass(), nullptr); | 65 return new sessions::InMemoryTabRestoreService(client.Pass(), nullptr); |
|
Lei Zhang
2015/12/27 22:35:06
Did you miss one here?
dcheng
2015/12/27 23:09:36
This will be updated when I make a pass over the A
| |
| 64 #else | 66 #else |
| 65 return new sessions::PersistentTabRestoreService(client.Pass(), nullptr); | 67 return new sessions::PersistentTabRestoreService(std::move(client), nullptr); |
| 66 #endif | 68 #endif |
| 67 } | 69 } |
| OLD | NEW |