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

Side by Side Diff: chrome/browser/debugger/devtools_window.cc

Issue 6247017: Revert 72153 - Remove user-related data from local_state and add to user_pre... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/net/predictor_api.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/json/json_writer.h" 6 #include "base/json/json_writer.h"
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browser_list.h" 10 #include "chrome/browser/browser_list.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 return tab_contents_->render_view_host(); 209 return tab_contents_->render_view_host();
210 } 210 }
211 211
212 void DevToolsWindow::CreateDevToolsBrowser() { 212 void DevToolsWindow::CreateDevToolsBrowser() {
213 // TODO(pfeldman): Make browser's getter for this key static. 213 // TODO(pfeldman): Make browser's getter for this key static.
214 std::string wp_key; 214 std::string wp_key;
215 wp_key.append(prefs::kBrowserWindowPlacement); 215 wp_key.append(prefs::kBrowserWindowPlacement);
216 wp_key.append("_"); 216 wp_key.append("_");
217 wp_key.append(kDevToolsApp); 217 wp_key.append(kDevToolsApp);
218 218
219 PrefService* prefs = profile_->GetPrefs(); 219 PrefService* prefs = g_browser_process->local_state();
220 if (!prefs->FindPreference(wp_key.c_str())) { 220 if (!prefs->FindPreference(wp_key.c_str())) {
221 prefs->RegisterDictionaryPref(wp_key.c_str()); 221 prefs->RegisterDictionaryPref(wp_key.c_str());
222 } 222 }
223 223
224 const DictionaryValue* wp_pref = prefs->GetDictionary(wp_key.c_str()); 224 const DictionaryValue* wp_pref = prefs->GetDictionary(wp_key.c_str());
225 if (!wp_pref) { 225 if (!wp_pref) {
226 DictionaryValue* defaults = prefs->GetMutableDictionary(wp_key.c_str()); 226 DictionaryValue* defaults = prefs->GetMutableDictionary(wp_key.c_str());
227 defaults->SetInteger("left", 100); 227 defaults->SetInteger("left", 100);
228 defaults->SetInteger("top", 100); 228 defaults->SetInteger("top", 100);
229 defaults->SetInteger("right", 740); 229 defaults->SetInteger("right", 740);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 return false; 410 return false;
411 } 411 }
412 412
413 void DevToolsWindow::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { 413 void DevToolsWindow::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
414 if (docked_) { 414 if (docked_) {
415 BrowserWindow* inspected_window = GetInspectedBrowserWindow(); 415 BrowserWindow* inspected_window = GetInspectedBrowserWindow();
416 if (inspected_window) 416 if (inspected_window)
417 inspected_window->HandleKeyboardEvent(event); 417 inspected_window->HandleKeyboardEvent(event);
418 } 418 }
419 } 419 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/predictor_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698