forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move http_server_properties_manager from chrome/browser/net to net/http.
BUG= Review URL: https://codereview.chromium.org/378823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282319 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
mef@chromium.org
committed
Jul 10, 2014
1 parent
8ca02c0
commit ad66db1
Showing
13 changed files
with
453 additions
and
387 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
chrome/browser/net/http_server_properties_manager_factory.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "chrome/browser/net/http_server_properties_manager_factory.h" | ||
|
||
#include "chrome/common/pref_names.h" | ||
#include "components/pref_registry/pref_registry_syncable.h" | ||
#include "content/public/browser/browser_thread.h" | ||
#include "net/http/http_server_properties_manager.h" | ||
|
||
namespace chrome_browser_net { | ||
|
||
/* static */ | ||
net::HttpServerPropertiesManager* | ||
HttpServerPropertiesManagerFactory::CreateManager(PrefService* pref_service) { | ||
using content::BrowserThread; | ||
return new net::HttpServerPropertiesManager( | ||
pref_service, | ||
prefs::kHttpServerProperties, | ||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | ||
} | ||
|
||
/* static */ | ||
void HttpServerPropertiesManagerFactory::RegisterProfilePrefs( | ||
user_prefs::PrefRegistrySyncable* registry) { | ||
registry->RegisterDictionaryPref( | ||
prefs::kHttpServerProperties, | ||
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | ||
} | ||
|
||
} // namespace chrome_browser_net |
39 changes: 39 additions & 0 deletions
39
chrome/browser/net/http_server_properties_manager_factory.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_FACTORY_H_ | ||
#define CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_FACTORY_H_ | ||
|
||
#include "base/macros.h" | ||
|
||
class PrefService; | ||
|
||
namespace net { | ||
class HttpServerPropertiesManager; | ||
} | ||
|
||
namespace user_prefs { | ||
class PrefRegistrySyncable; | ||
} | ||
|
||
namespace chrome_browser_net { | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
// Class for registration and creation of HttpServerPropertiesManager | ||
class HttpServerPropertiesManagerFactory { | ||
public: | ||
// Create an instance of HttpServerPropertiesManager. | ||
static net::HttpServerPropertiesManager* CreateManager( | ||
PrefService* pref_service); | ||
|
||
// Register prefs for properties managed by HttpServerPropertiesManager. | ||
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | ||
|
||
private: | ||
DISALLOW_IMPLICIT_CONSTRUCTORS(HttpServerPropertiesManagerFactory); | ||
}; | ||
|
||
} // namespace chrome_browser_net | ||
|
||
#endif // CHROME_BROWSER_NET_HTTP_SERVER_PROPERTIES_MANAGER_FACTORY_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.