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

Side by Side Diff: chrome/browser/android/resource_mapper.cc

Issue 443193006: Show icons in Android web autofill dropdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix indent Created 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "chrome/browser/android/resource_mapper.h" 5 #include "chrome/browser/android/resource_mapper.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "grit/component_scaled_resources.h"
aurimas (slooooooooow) 2014/08/28 21:06:04 Why do we need this import?
Evan Stade 2014/08/29 17:45:34 it's where the autofill resource ids live
11 #include "grit/theme_resources.h" 12 #include "grit/theme_resources.h"
12 13
13 namespace { 14 namespace {
14 15
15 typedef std::map<int, int> ResourceMap; 16 typedef std::map<int, int> ResourceMap;
16 base::LazyInstance<ResourceMap>::Leaky g_id_map = LAZY_INSTANCE_INITIALIZER; 17 base::LazyInstance<ResourceMap>::Leaky g_id_map = LAZY_INSTANCE_INITIALIZER;
17 18
18 } // namespace 19 } // namespace
19 20
20 const int ResourceMapper::kMissingId = -1; 21 const int ResourceMapper::kMissingId = -1;
(...skipping 14 matching lines...) Expand all
35 } 36 }
36 37
37 void ResourceMapper::ConstructMap() { 38 void ResourceMapper::ConstructMap() {
38 DCHECK(g_id_map.Get().empty()); 39 DCHECK(g_id_map.Get().empty());
39 int next_id = 0; 40 int next_id = 0;
40 41
41 #define DEFINE_RESOURCE_ID(c_id,java_id) g_id_map.Get()[c_id] = next_id++; 42 #define DEFINE_RESOURCE_ID(c_id,java_id) g_id_map.Get()[c_id] = next_id++;
42 #include "chrome/browser/android/resource_id.h" 43 #include "chrome/browser/android/resource_id.h"
43 #undef DEFINE_RESOURCE_ID 44 #undef DEFINE_RESOURCE_ID
44 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698