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

Side by Side Diff: chrome/browser/extensions/menu_manager.cc

Issue 13949011: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 #include "chrome/browser/extensions/menu_manager.h" 5 #include "chrome/browser/extensions/menu_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 DCHECK_EQ(0, id_.uid); 195 DCHECK_EQ(0, id_.uid);
196 value->SetString(kStringUIDKey, id_.string_uid); 196 value->SetString(kStringUIDKey, id_.string_uid);
197 value->SetBoolean(kIncognitoKey, id_.incognito); 197 value->SetBoolean(kIncognitoKey, id_.incognito);
198 value->SetInteger(kTypeKey, type_); 198 value->SetInteger(kTypeKey, type_);
199 if (type_ != SEPARATOR) 199 if (type_ != SEPARATOR)
200 value->SetString(kTitleKey, title_); 200 value->SetString(kTitleKey, title_);
201 if (type_ == CHECKBOX || type_ == RADIO) 201 if (type_ == CHECKBOX || type_ == RADIO)
202 value->SetBoolean(kCheckedKey, checked_); 202 value->SetBoolean(kCheckedKey, checked_);
203 value->SetBoolean(kEnabledKey, enabled_); 203 value->SetBoolean(kEnabledKey, enabled_);
204 value->Set(kContextsKey, contexts_.ToValue().release()); 204 value->Set(kContextsKey, contexts_.ToValue().release());
205 if (parent_id_.get()) { 205 if (parent_id_) {
206 DCHECK_EQ(0, parent_id_->uid); 206 DCHECK_EQ(0, parent_id_->uid);
207 value->SetString(kParentUIDKey, parent_id_->string_uid); 207 value->SetString(kParentUIDKey, parent_id_->string_uid);
208 } 208 }
209 value->Set(kDocumentURLPatternsKey, 209 value->Set(kDocumentURLPatternsKey,
210 document_url_patterns_.ToValue().release()); 210 document_url_patterns_.ToValue().release());
211 value->Set(kTargetURLPatternsKey, target_url_patterns_.ToValue().release()); 211 value->Set(kTargetURLPatternsKey, target_url_patterns_.ToValue().release());
212 return value.Pass(); 212 return value.Pass();
213 } 213 }
214 214
215 // static 215 // static
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 if (uid < other.uid) 862 if (uid < other.uid)
863 return true; 863 return true;
864 if (uid == other.uid) 864 if (uid == other.uid)
865 return string_uid < other.string_uid; 865 return string_uid < other.string_uid;
866 } 866 }
867 } 867 }
868 return false; 868 return false;
869 } 869 }
870 870
871 } // namespace extensions 871 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/media_galleries_handler.cc ('k') | chrome/browser/extensions/menu_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698