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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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& cloud_print_server_url() const {
29 return cloud_print_server_url_;
30 };
31
32 const std::string& proxy_id() const {
33 return proxy_id_;
34 }
35
36 bool remove_missing_printers() const {
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 cloud_print_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 DISALLOW_COPY_AND_ASSIGN(ConnectorSettings);
Lei Zhang 2012/09/21 20:26:22 nit: add a newline before this.
Vitaly Buka (NO REVIEWS) 2012/09/21 20:36:37 Done.
59 };
60
61 #endif // CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_
62
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698