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> | 7 #include <utility> |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 } | 55 } |
56 | 56 |
57 KeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( | 57 KeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( |
58 content::BrowserContext* browser_context) const { | 58 content::BrowserContext* browser_context) const { |
59 Profile* profile = Profile::FromBrowserContext(browser_context); | 59 Profile* profile = Profile::FromBrowserContext(browser_context); |
60 DCHECK(!profile->IsOffTheRecord()); | 60 DCHECK(!profile->IsOffTheRecord()); |
61 scoped_ptr<sessions::TabRestoreServiceClient> client( | 61 scoped_ptr<sessions::TabRestoreServiceClient> client( |
62 new ChromeTabRestoreServiceClient(profile)); | 62 new ChromeTabRestoreServiceClient(profile)); |
63 | 63 |
64 #if defined(OS_ANDROID) | 64 #if defined(OS_ANDROID) |
65 return new sessions::InMemoryTabRestoreService(client.Pass(), nullptr); | 65 return new sessions::InMemoryTabRestoreService(std::move(client), nullptr); |
66 #else | 66 #else |
67 return new sessions::PersistentTabRestoreService(std::move(client), nullptr); | 67 return new sessions::PersistentTabRestoreService(std::move(client), nullptr); |
68 #endif | 68 #endif |
69 } | 69 } |
OLD | NEW |