Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: chrome/browser/profiles/profile_keyed_base_factory.h

Issue 12330073: Disable ProfileKeyedServices on import process by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to ToT Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_KEYED_BASE_FACTORY_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_KEYED_BASE_FACTORY_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_KEYED_BASE_FACTORY_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_KEYED_BASE_FACTORY_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/threading/non_thread_safe.h" 10 #include "base/threading/non_thread_safe.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // created as soon as the Profile has been brought up. 65 // created as soon as the Profile has been brought up.
66 virtual bool ServiceIsCreatedWithProfile() const; 66 virtual bool ServiceIsCreatedWithProfile() const;
67 67
68 // By default, TestingProfiles will be treated like normal profiles. You can 68 // By default, TestingProfiles will be treated like normal profiles. You can
69 // override this so that by default, the service associated with the 69 // override this so that by default, the service associated with the
70 // TestingProfile is NULL. (This is just a shortcut around 70 // TestingProfile is NULL. (This is just a shortcut around
71 // SetTestingFactory() to make sure our profiles don't directly refer to the 71 // SetTestingFactory() to make sure our profiles don't directly refer to the
72 // services they use.) 72 // services they use.)
73 virtual bool ServiceIsNULLWhileTesting() const; 73 virtual bool ServiceIsNULLWhileTesting() const;
74 74
75 // By default, we do not create any services on the import process. Any
76 // services that are required to perform an import should override this method
77 // and return |false|. Note that any services created on the import process
78 // may run in parallel with another instance of the service running in the
79 // main browser process, so care must be taken to avoid conflicting use of
80 // non-shareable resources like DB files.
81 virtual bool ServiceIsNULLOnImportProcess() const;
82
75 // Interface for people building a type of ProfileKeyedFactory: ------------- 83 // Interface for people building a type of ProfileKeyedFactory: -------------
76 84
77 // A helper object actually listens for notifications about Profile 85 // A helper object actually listens for notifications about Profile
78 // destruction, calculates the order in which things are destroyed and then 86 // destruction, calculates the order in which things are destroyed and then
79 // does a two pass shutdown. 87 // does a two pass shutdown.
80 // 88 //
81 // It is up to the individual factory types to determine what this two pass 89 // It is up to the individual factory types to determine what this two pass
82 // shutdown means. The general framework guarantees the following: 90 // shutdown means. The general framework guarantees the following:
83 // 91 //
84 // - Each ProfileShutdown() is called in dependency order (and you may reach 92 // - Each ProfileShutdown() is called in dependency order (and you may reach
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 131
124 #if !defined(NDEBUG) 132 #if !defined(NDEBUG)
125 // A static string passed in to our constructor. Should be unique across all 133 // A static string passed in to our constructor. Should be unique across all
126 // services. This is used only for debugging in debug mode. (We can print 134 // services. This is used only for debugging in debug mode. (We can print
127 // pretty graphs with GraphViz with this information.) 135 // pretty graphs with GraphViz with this information.)
128 const char* service_name_; 136 const char* service_name_;
129 #endif 137 #endif
130 }; 138 };
131 139
132 #endif // CHROME_BROWSER_PROFILES_PROFILE_KEYED_BASE_FACTORY_H_ 140 #endif // CHROME_BROWSER_PROFILES_PROFILE_KEYED_BASE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698