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

Side by Side Diff: chrome/service/cloud_print/connector_settings.h

Issue 10966052: Added options to disable specific printers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_
6 #define CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ 6 #define CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_
7 7
8 #include <set>
8 #include <string> 9 #include <string>
9 10
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 #include "googleurl/src/gurl.h" 12 #include "googleurl/src/gurl.h"
12 13
13 class ServiceProcessPrefs; 14 class ServiceProcessPrefs;
14 15
15 namespace base { 16 namespace base {
16 class DictionaryValue; 17 class DictionaryValue;
17 } 18 }
(...skipping 12 matching lines...) Expand all
30 }; 31 };
31 32
32 const std::string& proxy_id() const { 33 const std::string& proxy_id() const {
33 return proxy_id_; 34 return proxy_id_;
34 } 35 }
35 36
36 bool delete_on_enum_fail() const { 37 bool delete_on_enum_fail() const {
37 return delete_on_enum_fail_; 38 return delete_on_enum_fail_;
38 } 39 }
39 40
41 bool connect_new_printers() const {
42 return connect_new_printers_;
43 };
44
40 const base::DictionaryValue* print_system_settings() const { 45 const base::DictionaryValue* print_system_settings() const {
41 return print_system_settings_.get(); 46 return print_system_settings_.get();
42 }; 47 };
43 48
49 bool IsPrinterBlacklisted(const std::string& name) const;
50
44 private: 51 private:
45 // Cloud Print server url. 52 // Cloud Print server url.
46 GURL server_url_; 53 GURL server_url_;
47 54
48 // This is initialized after a successful call to one of the Enable* methods. 55 // This is initialized after a successful call to one of the Enable* methods.
49 // It is not cleared in DisableUser. 56 // It is not cleared in DisableUser.
50 std::string proxy_id_; 57 std::string proxy_id_;
51 58
52 // If |true| printers that are not found locally will be deleted on GCP 59 // If |true| printers that are not found locally will be deleted on GCP
53 // even if the local enumeration failed. 60 // even if the local enumeration failed.
54 bool delete_on_enum_fail_; 61 bool delete_on_enum_fail_;
55 62
63 // If true register all new printers in cloud print.
64 bool connect_new_printers_;
65
66 // List of printers which should not be connected.
67 std::set<std::string> printer_blacklist_;
68
56 // Print system settings. 69 // Print system settings.
57 scoped_ptr<base::DictionaryValue> print_system_settings_; 70 scoped_ptr<base::DictionaryValue> print_system_settings_;
58 71
59 DISALLOW_COPY_AND_ASSIGN(ConnectorSettings); 72 DISALLOW_COPY_AND_ASSIGN(ConnectorSettings);
60 }; 73 };
61 74
62 #endif // CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ 75 #endif // CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_
63 76
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_connector.cc ('k') | chrome/service/cloud_print/connector_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698