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

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

Issue 8373027: Prevent incognito windows from opening when incognito mode is disabled. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Pulled incognito decision logic into a separate function. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extension_tabs_module_constants.h" 5 #include "chrome/browser/extensions/extension_tabs_module_constants.h"
6 6
7 namespace extension_tabs_module_constants { 7 namespace extension_tabs_module_constants {
8 8
9 const char kActiveKey[] = "active"; 9 const char kActiveKey[] = "active";
10 const char kAllFramesKey[] = "allFrames"; 10 const char kAllFramesKey[] = "allFrames";
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 const char kNoCurrentWindowError[] = "No current window"; 68 const char kNoCurrentWindowError[] = "No current window";
69 const char kNoLastFocusedWindowError[] = "No last-focused window"; 69 const char kNoLastFocusedWindowError[] = "No last-focused window";
70 const char kWindowNotFoundError[] = "No window with id: *."; 70 const char kWindowNotFoundError[] = "No window with id: *.";
71 const char kTabIndexNotFoundError[] = "No tab at index: *."; 71 const char kTabIndexNotFoundError[] = "No tab at index: *.";
72 const char kTabNotFoundError[] = "No tab with id: *."; 72 const char kTabNotFoundError[] = "No tab with id: *.";
73 const char kTabStripNotEditableError[] = 73 const char kTabStripNotEditableError[] =
74 "Tabs cannot be edited right now (user may be dragging a tab)."; 74 "Tabs cannot be edited right now (user may be dragging a tab).";
75 const char kNoSelectedTabError[] = "No selected tab"; 75 const char kNoSelectedTabError[] = "No selected tab";
76 const char kNoHighlightedTabError[] = "No highlighted tab"; 76 const char kNoHighlightedTabError[] = "No highlighted tab";
77 const char kIncognitoModeIsDisabled[] = "Incognito mode is disabled."; 77 const char kIncognitoModeIsDisabled[] = "Incognito mode is disabled.";
78 const char kIncognitoModeIsForced[] = "Incognito mode is forced. "
79 "Cannot open normal windows.";
78 const char kURLsNotAllowedInIncognitoError[] = "Cannot open URL \"*\" " 80 const char kURLsNotAllowedInIncognitoError[] = "Cannot open URL \"*\" "
79 "in an incognito window."; 81 "in an incognito window.";
80 const char kInvalidUrlError[] = "Invalid url: \"*\"."; 82 const char kInvalidUrlError[] = "Invalid url: \"*\".";
81 const char kInternalVisibleTabCaptureError[] = 83 const char kInternalVisibleTabCaptureError[] =
82 "Internal error while trying to capture visible region of the current tab"; 84 "Internal error while trying to capture visible region of the current tab";
83 const char kNotImplementedError[] = "This call is not yet implemented"; 85 const char kNotImplementedError[] = "This call is not yet implemented";
84 const char kSupportedInWindowsOnlyError[] = "Supported in Windows only"; 86 const char kSupportedInWindowsOnlyError[] = "Supported in Windows only";
85 87
86 const char kNoCodeOrFileToExecuteError[] = "No source code or file specified."; 88 const char kNoCodeOrFileToExecuteError[] = "No source code or file specified.";
87 const char kMoreThanOneValuesError[] = "Code and file should not be specified " 89 const char kMoreThanOneValuesError[] = "Code and file should not be specified "
88 "at the same time in the second argument."; 90 "at the same time in the second argument.";
89 const char kLoadFileError[] = "Failed to load file: \"*\". "; 91 const char kLoadFileError[] = "Failed to load file: \"*\". ";
90 const char kCannotDetermineLanguageOfUnloadedTab[] = 92 const char kCannotDetermineLanguageOfUnloadedTab[] =
91 "Cannot determine language: tab not loaded"; 93 "Cannot determine language: tab not loaded";
92 94
93 } // namespace extension_tabs_module_constants 95 } // namespace extension_tabs_module_constants
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module_constants.h ('k') | chrome/browser/extensions/extension_tabs_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698