Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ | |
| 6 #define CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "googleurl/src/gurl.h" | |
| 12 | |
| 13 class ServiceProcessPrefs; | |
| 14 | |
| 15 namespace base { | |
| 16 class DictionaryValue; | |
| 17 } | |
| 18 | |
| 19 class ConnectorSettings { | |
| 20 public: | |
| 21 ConnectorSettings(); | |
| 22 ~ConnectorSettings(); | |
| 23 | |
| 24 void InitFrom(ServiceProcessPrefs* prefs); | |
| 25 | |
| 26 void CopyFrom(const ConnectorSettings& source); | |
| 27 | |
| 28 const GURL& server_url() const { | |
| 29 return server_url_; | |
| 30 }; | |
| 31 | |
| 32 const std::string& proxy_id() const { | |
| 33 return proxy_id_; | |
| 34 } | |
| 35 | |
| 36 bool remove_missing_printers() const { | |
|
gene
2012/09/21 22:08:36
Can we rename this? Meaning of this flag is to rem
Vitaly Buka (NO REVIEWS)
2012/09/21 22:34:09
Done.
| |
| 37 return remove_missing_printers_; | |
| 38 } | |
| 39 | |
| 40 const base::DictionaryValue* print_system_settings() const { | |
| 41 return print_system_settings_.get(); | |
| 42 }; | |
| 43 | |
| 44 private: | |
| 45 // Cloud Print server url. | |
| 46 GURL server_url_; | |
| 47 | |
| 48 // This is initialized after a successful call to one of the Enable* methods. | |
| 49 // It is not cleared in DisableUser. | |
| 50 std::string proxy_id_; | |
| 51 | |
| 52 // If |true| printers that are not found locally will be deleted on GCP | |
| 53 // even if the local enumeration failed. | |
| 54 bool remove_missing_printers_; | |
| 55 | |
| 56 // Print system settings. | |
| 57 scoped_ptr<base::DictionaryValue> print_system_settings_; | |
| 58 | |
| 59 DISALLOW_COPY_AND_ASSIGN(ConnectorSettings); | |
| 60 }; | |
| 61 | |
| 62 #endif // CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ | |
| 63 | |
| OLD | NEW |