| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/enhanced_bookmarks/bookmark_server_cluster_service_fact
    ory.h" | 5 #include "chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_fact
    ory.h" | 
| 6 | 6 | 
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" | 
| 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" | 
| 10 #include "chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.h" | 10 #include "chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.h" | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 29   DependsOn(SigninManagerFactory::GetInstance()); | 29   DependsOn(SigninManagerFactory::GetInstance()); | 
| 30   DependsOn(BookmarkModelFactory::GetInstance()); | 30   DependsOn(BookmarkModelFactory::GetInstance()); | 
| 31 } | 31 } | 
| 32 | 32 | 
| 33 BookmarkServerClusterServiceFactory::~BookmarkServerClusterServiceFactory() { | 33 BookmarkServerClusterServiceFactory::~BookmarkServerClusterServiceFactory() { | 
| 34 } | 34 } | 
| 35 | 35 | 
| 36 // static | 36 // static | 
| 37 BookmarkServerClusterServiceFactory* | 37 BookmarkServerClusterServiceFactory* | 
| 38 BookmarkServerClusterServiceFactory::GetInstance() { | 38 BookmarkServerClusterServiceFactory::GetInstance() { | 
| 39   return Singleton<BookmarkServerClusterServiceFactory>::get(); | 39   return base::Singleton<BookmarkServerClusterServiceFactory>::get(); | 
| 40 } | 40 } | 
| 41 | 41 | 
| 42 // static | 42 // static | 
| 43 BookmarkServerClusterService* | 43 BookmarkServerClusterService* | 
| 44 BookmarkServerClusterServiceFactory::GetForBrowserContext( | 44 BookmarkServerClusterServiceFactory::GetForBrowserContext( | 
| 45     content::BrowserContext* context) { | 45     content::BrowserContext* context) { | 
| 46   DCHECK(!context->IsOffTheRecord()); | 46   DCHECK(!context->IsOffTheRecord()); | 
| 47   return static_cast<BookmarkServerClusterService*>( | 47   return static_cast<BookmarkServerClusterService*>( | 
| 48       GetInstance()->GetServiceForBrowserContext(context, true)); | 48       GetInstance()->GetServiceForBrowserContext(context, true)); | 
| 49 } | 49 } | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 62       ProfileSyncServiceFactory::GetForProfile(profile), profile->GetPrefs()); | 62       ProfileSyncServiceFactory::GetForProfile(profile), profile->GetPrefs()); | 
| 63 } | 63 } | 
| 64 | 64 | 
| 65 content::BrowserContext* | 65 content::BrowserContext* | 
| 66 BookmarkServerClusterServiceFactory::GetBrowserContextToUse( | 66 BookmarkServerClusterServiceFactory::GetBrowserContextToUse( | 
| 67     content::BrowserContext* context) const { | 67     content::BrowserContext* context) const { | 
| 68   return chrome::GetBrowserContextRedirectedInIncognito(context); | 68   return chrome::GetBrowserContextRedirectedInIncognito(context); | 
| 69 } | 69 } | 
| 70 | 70 | 
| 71 }  // namespace enhanced_bookmarks | 71 }  // namespace enhanced_bookmarks | 
| OLD | NEW | 
|---|