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

Unified Diff: ui/base/x/selection_requestor.cc

Issue 2914103002: Remove usages of XInternAtom (Closed)
Patch Set: Address sadrul and sergeyu comments Created 3 years, 7 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
« no previous file with comments | « ui/base/x/selection_requestor.h ('k') | ui/base/x/selection_requestor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/selection_requestor.cc
diff --git a/ui/base/x/selection_requestor.cc b/ui/base/x/selection_requestor.cc
index 324d642c375ebe08aa51b2470ab18d479f8be6dc..a6e402c3f9bb01e568d2c4923acc0312f9b9f7b7 100644
--- a/ui/base/x/selection_requestor.cc
+++ b/ui/base/x/selection_requestor.cc
@@ -22,12 +22,6 @@ namespace {
const char kChromeSelection[] = "CHROME_SELECTION";
const char kIncr[] = "INCR";
-const char* kAtomsToCache[] = {
- kChromeSelection,
- kIncr,
- NULL
-};
-
// The period of |abort_timer_|. Arbitrary but must be <= than
// kRequestTimeoutMs.
const int kTimerPeriodMs = 100;
@@ -67,9 +61,8 @@ SelectionRequestor::SelectionRequestor(XDisplay* x_display,
x_window_(x_window),
x_property_(None),
dispatcher_(dispatcher),
- current_request_index_(0u),
- atom_cache_(x_display_, kAtomsToCache) {
- x_property_ = atom_cache_.GetAtom(kChromeSelection);
+ current_request_index_(0u) {
+ x_property_ = GetAtom(kChromeSelection);
}
SelectionRequestor::~SelectionRequestor() {}
@@ -169,7 +162,7 @@ void SelectionRequestor::OnSelectionNotify(const XEvent& event) {
if (event_property != None)
XDeleteProperty(x_display_, x_window_, event_property);
- if (request->out_type == atom_cache_.GetAtom(kIncr)) {
+ if (request->out_type == GetAtom(kIncr)) {
request->data_sent_incrementally = true;
request->out_data.clear();
request->out_data_items = 0u;
« no previous file with comments | « ui/base/x/selection_requestor.h ('k') | ui/base/x/selection_requestor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698