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

Unified Diff: chrome/service/cloud_print/connector_settings.h

Issue 10968031: Added ConnectorSettings class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/service/cloud_print/connector_settings.h
diff --git a/chrome/service/cloud_print/connector_settings.h b/chrome/service/cloud_print/connector_settings.h
new file mode 100644
index 0000000000000000000000000000000000000000..ede619fd452c3054b36a610faded42cd780f9966
--- /dev/null
+++ b/chrome/service/cloud_print/connector_settings.h
@@ -0,0 +1,63 @@
+// Copyright (c) 2012 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_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_
+#define CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_
+
+#include <string>
+
+#include "base/memory/scoped_ptr.h"
+#include "googleurl/src/gurl.h"
+
+class ServiceProcessPrefs;
+
+namespace base {
+ class DictionaryValue;
+}
+
+class ConnectorSettings {
+ public:
+ ConnectorSettings();
+ ~ConnectorSettings();
+
+ void InitFrom(ServiceProcessPrefs* prefs);
+
+ void CopyFrom(const ConnectorSettings& source);
+
+ const GURL& server_url() const {
+ return server_url_;
+ };
+
+ const std::string& proxy_id() const {
+ return proxy_id_;
+ }
+
+ 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.
+ return remove_missing_printers_;
+ }
+
+ const base::DictionaryValue* print_system_settings() const {
+ return print_system_settings_.get();
+ };
+
+ private:
+ // Cloud Print server url.
+ GURL server_url_;
+
+ // This is initialized after a successful call to one of the Enable* methods.
+ // It is not cleared in DisableUser.
+ std::string proxy_id_;
+
+ // If |true| printers that are not found locally will be deleted on GCP
+ // even if the local enumeration failed.
+ bool remove_missing_printers_;
+
+ // Print system settings.
+ scoped_ptr<base::DictionaryValue> print_system_settings_;
+
+ DISALLOW_COPY_AND_ASSIGN(ConnectorSettings);
+};
+
+#endif // CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_
+

Powered by Google App Engine
This is Rietveld 408576698