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

Side by Side Diff: rlz/chromeos/lib/rlz_value_store_chromeos.h

Issue 1353323003: Cleanup: Pass std::string as const reference from rlz/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | rlz/chromeos/lib/rlz_value_store_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_ 5 #ifndef RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_
6 #define RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_ 6 #define RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/threading/non_thread_safe.h" 9 #include "base/threading/non_thread_safe.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void CollectGarbage() override; 57 void CollectGarbage() override;
58 58
59 private: 59 private:
60 // Reads RLZ store from file. 60 // Reads RLZ store from file.
61 void ReadStore(); 61 void ReadStore();
62 62
63 // Writes RLZ store back to file. 63 // Writes RLZ store back to file.
64 void WriteStore(); 64 void WriteStore();
65 65
66 // Adds |value| to list at |list_name| path in JSON store. 66 // Adds |value| to list at |list_name| path in JSON store.
67 bool AddValueToList(std::string list_name, base::Value* value); 67 bool AddValueToList(const std::string& list_name, base::Value* value);
68 // Removes |value| from list at |list_name| path in JSON store. 68 // Removes |value| from list at |list_name| path in JSON store.
69 bool RemoveValueFromList(std::string list_name, const base::Value& value); 69 bool RemoveValueFromList(const std::string& list_name,
70 const base::Value& value);
70 71
71 // In-memory store with RLZ data. 72 // In-memory store with RLZ data.
72 scoped_ptr<base::DictionaryValue> rlz_store_; 73 scoped_ptr<base::DictionaryValue> rlz_store_;
73 74
74 base::FilePath store_path_; 75 base::FilePath store_path_;
75 76
76 bool read_only_; 77 bool read_only_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(RlzValueStoreChromeOS); 79 DISALLOW_COPY_AND_ASSIGN(RlzValueStoreChromeOS);
79 }; 80 };
80 81
81 } // namespace rlz_lib 82 } // namespace rlz_lib
82 83
83 #endif // RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_ 84 #endif // RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | rlz/chromeos/lib/rlz_value_store_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698