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

Side by Side Diff: chrome/browser/ui/browser_window_state.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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/ui/browser_window_state.h" 5 #include "chrome/browser/ui/browser_window_state.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/scoped_user_pref_update.h" 9 #include "base/prefs/scoped_user_pref_update.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 30 matching lines...) Expand all
41 return true; 41 return true;
42 } 42 }
43 43
44 class WindowPlacementPrefUpdate : public DictionaryPrefUpdate { 44 class WindowPlacementPrefUpdate : public DictionaryPrefUpdate {
45 public: 45 public:
46 WindowPlacementPrefUpdate(PrefService* service, 46 WindowPlacementPrefUpdate(PrefService* service,
47 const std::string& window_name) 47 const std::string& window_name)
48 : DictionaryPrefUpdate(service, prefs::kAppWindowPlacement), 48 : DictionaryPrefUpdate(service, prefs::kAppWindowPlacement),
49 window_name_(window_name) {} 49 window_name_(window_name) {}
50 50
51 virtual ~WindowPlacementPrefUpdate() {} 51 ~WindowPlacementPrefUpdate() override {}
52 52
53 virtual base::DictionaryValue* Get() override { 53 base::DictionaryValue* Get() override {
54 base::DictionaryValue* all_apps_dict = DictionaryPrefUpdate::Get(); 54 base::DictionaryValue* all_apps_dict = DictionaryPrefUpdate::Get();
55 base::DictionaryValue* this_app_dict = NULL; 55 base::DictionaryValue* this_app_dict = NULL;
56 if (!all_apps_dict->GetDictionary(window_name_, &this_app_dict)) { 56 if (!all_apps_dict->GetDictionary(window_name_, &this_app_dict)) {
57 this_app_dict = new base::DictionaryValue; 57 this_app_dict = new base::DictionaryValue;
58 all_apps_dict->Set(window_name_, this_app_dict); 58 all_apps_dict->Set(window_name_, this_app_dict);
59 } 59 }
60 return this_app_dict; 60 return this_app_dict;
61 } 61 }
62 62
63 private: 63 private:
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 if (parsed_command_line.HasSwitch(switches::kWindowPosition)) { 161 if (parsed_command_line.HasSwitch(switches::kWindowPosition)) {
162 std::string str = 162 std::string str =
163 parsed_command_line.GetSwitchValueASCII(switches::kWindowPosition); 163 parsed_command_line.GetSwitchValueASCII(switches::kWindowPosition);
164 int x, y; 164 int x, y;
165 if (ParseCommaSeparatedIntegers(str, &x, &y)) 165 if (ParseCommaSeparatedIntegers(str, &x, &y))
166 bounds->set_origin(gfx::Point(x, y)); 166 bounds->set_origin(gfx::Point(x, y));
167 } 167 }
168 } 168 }
169 169
170 } // namespace chrome 170 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698